src/joystick/linux/SDL_sysjoystick.c
changeset 9630 6c86d3216f6a
parent 9619 b94b6d0bff0f
child 9998 f67cf37e9cd4
equal deleted inserted replaced
9629:9242a9b29c7d 9630:6c86d3216f6a
   490 #endif
   490 #endif
   491                 joystick->hwdata->key_map[i - BTN_MISC] = joystick->nbuttons;
   491                 joystick->hwdata->key_map[i - BTN_MISC] = joystick->nbuttons;
   492                 ++joystick->nbuttons;
   492                 ++joystick->nbuttons;
   493             }
   493             }
   494         }
   494         }
   495         for (i = 0; i < ABS_MISC; ++i) {
   495         for (i = 0; i < ABS_MAX; ++i) {
   496             /* Skip hats */
   496             /* Skip hats */
   497             if (i == ABS_HAT0X) {
   497             if (i == ABS_HAT0X) {
   498                 i = ABS_HAT3Y;
   498                 i = ABS_HAT3Y;
   499                 continue;
   499                 continue;
   500             }
   500             }
   751                                               joystick->hwdata->key_map[code],
   751                                               joystick->hwdata->key_map[code],
   752                                               events[i].value);
   752                                               events[i].value);
   753                 }
   753                 }
   754                 break;
   754                 break;
   755             case EV_ABS:
   755             case EV_ABS:
   756                 if (code >= ABS_MISC) {
       
   757                     break;
       
   758                 }
       
   759 
       
   760                 switch (code) {
   756                 switch (code) {
   761                 case ABS_HAT0X:
   757                 case ABS_HAT0X:
   762                 case ABS_HAT0Y:
   758                 case ABS_HAT0Y:
   763                 case ABS_HAT1X:
   759                 case ABS_HAT1X:
   764                 case ABS_HAT1Y:
   760                 case ABS_HAT1Y: