src/joystick/linux/SDL_sysjoystick.c
changeset 896 b56dc586a5ef
parent 892 dc29e5907694
child 914 bbf8dcc8aed6
equal deleted inserted replaced
895:ec659230eaac 896:b56dc586a5ef
   592 				continue;
   592 				continue;
   593 			}
   593 			}
   594 			if ( test_bit(i, absbit) ) {
   594 			if ( test_bit(i, absbit) ) {
   595 				int values[5];
   595 				int values[5];
   596 
   596 
   597 				ioctl(fd, EVIOCGABS(i), values);
   597 				if ( ioctl(fd, EVIOCGABS(i), values) < 0 )
       
   598 					continue;
   598 #ifdef DEBUG_INPUT_EVENTS
   599 #ifdef DEBUG_INPUT_EVENTS
   599 				printf("Joystick has absolute axis: %x\n", i);
   600 				printf("Joystick has absolute axis: %x\n", i);
   600 				printf("Values = { %d, %d, %d, %d, %d }\n",
   601 				printf("Values = { %d, %d, %d, %d, %d }\n",
   601 					values[0], values[1],
   602 					values[0], values[1],
   602 					values[2], values[3], values[4]);
   603 					values[2], values[3], values[4]);