File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed
Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -2418,19 +2418,21 @@ This is where OS specific stuff starts
24182418
24192419 if (js <= 0 )
24202420 break ;
2421+
24212422
2422-
2423+ if (RGFW_gamepadCount >= 4 ) {
2424+ close (js );
2425+ break ;
2426+ }
24232427
24242428 char evBits [(EV_CNT + 7 ) / 8 ] = {0 };
2425- char keyBits [(KEY_CNT + 7 ) / 8 ] = {0 };
24262429 char absBits [(ABS_CNT + 7 ) / 8 ] = {0 };
2427- struct input_id id ;
2430+ ioctl (js , EVIOCGBIT (0 , sizeof (evBits )), evBits );
2431+ ioctl (js , EVIOCGBIT (EV_ABS , sizeof (absBits )), absBits );
24282432
2429- if (RGFW_gamepadCount >= 4 || ioctl (js , EVIOCGBIT (0 , sizeof (evBits )), evBits ) < 0 ||
2430- ioctl (js , EVIOCGBIT (EV_ABS , sizeof (absBits )), absBits ) < 0 ||
2431- !(evBits [(EV_ABS ) / 8 ] & (1 << ((EV_ABS ) % 8 )))) {
2432- close (js );
2433- break ;
2433+ if (!(evBits [(EV_ABS ) / 8 ] & (1 << ((EV_ABS ) % 8 )))) {
2434+ close (js );
2435+ continue ;
24342436 }
24352437
24362438 RGFW_gamepadCount ++ ;
You can’t perform that action at this time.
0 commit comments