src/joystick/linux/SDL_sysjoystick.c
changeset 896 b56dc586a5ef
parent 892 dc29e5907694
child 914 bbf8dcc8aed6
--- a/src/joystick/linux/SDL_sysjoystick.c	Sun May 16 22:37:59 2004 +0000
+++ b/src/joystick/linux/SDL_sysjoystick.c	Sun May 16 22:48:06 2004 +0000
@@ -594,7 +594,8 @@
 			if ( test_bit(i, absbit) ) {
 				int values[5];
 
-				ioctl(fd, EVIOCGABS(i), values);
+				if ( ioctl(fd, EVIOCGABS(i), values) < 0 )
+					continue;
 #ifdef DEBUG_INPUT_EVENTS
 				printf("Joystick has absolute axis: %x\n", i);
 				printf("Values = { %d, %d, %d, %d, %d }\n",