On regular 64-bits Linux (doesn’t seem to be a problem on 32-bit
Linux), normal run of SDL tries to use the Linux input events (for
touch, it seems), but fails because it doesn’t have permissions.
This shouldn’t be a problem, but there is no check, besides an
annoying printf() message, that the open() call failed.
The result is the standard output being bombarded with “Error:
Couldn’t open stream” messages (file: src/video/x11/SDL_x11events.c
line:562).
This by itself is wrong, because after printing the message it happily
goes to use the invalid file descriptor on reads(), but the real
problem is that there is no check on the open() call that it failed.
The first patch is just indentation fixes (mixed tabs and spaces),
while the second patch just adds a check for the open() result and
ignores the device if it fails.
Regards,
~Nuno Lucas
-------------- next part --------------
A non-text attachment was scrubbed…
Name: SDL-01-fix_indentation.patch
Type: text/x-patch
Size: 3410 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20110928/c8f12b26/attachment.bin
-------------- next part --------------
A non-text attachment was scrubbed…
Name: SDL-02-handle_open_error.patch
Type: text/x-patch
Size: 780 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20110928/c8f12b26/attachment-0001.bin