src/joystick/windows/SDL_dxjoystick.c
changeset 8279 7e22273aed11
parent 8277 cd0a00060738
child 8280 860092ac58d6
equal deleted inserted replaced
8278:e60a7bb2b80b 8279:7e22273aed11
   780         for (iuserid = SDL_XINPUT_MAX_DEVICES-1; iuserid >= 0; iuserid--) {
   780         for (iuserid = SDL_XINPUT_MAX_DEVICES-1; iuserid >= 0; iuserid--) {
   781             const Uint8 userid = (Uint8) iuserid;
   781             const Uint8 userid = (Uint8) iuserid;
   782             XINPUT_CAPABILITIES capabilities;
   782             XINPUT_CAPABILITIES capabilities;
   783             if (XINPUTGETCAPABILITIES(userid, XINPUT_FLAG_GAMEPAD, &capabilities) == ERROR_SUCCESS) {
   783             if (XINPUTGETCAPABILITIES(userid, XINPUT_FLAG_GAMEPAD, &capabilities) == ERROR_SUCCESS) {
   784                 /* Current version of XInput mistakenly returns 0 as the Type. Ignore it and ensure the subtype is a gamepad. */
   784                 /* Current version of XInput mistakenly returns 0 as the Type. Ignore it and ensure the subtype is a gamepad. */
   785                 /* !!! FIXME: we might want to support steering wheels or guitars or whatever laster. */
   785                 /* !!! FIXME: we might want to support steering wheels or guitars or whatever later. */
   786                 if (capabilities.SubType == XINPUT_DEVSUBTYPE_GAMEPAD) {
   786                 if (capabilities.SubType == XINPUT_DEVSUBTYPE_GAMEPAD) {
   787                     AddXInputDevice(userid, pContext);
   787                     AddXInputDevice(userid, pContext);
   788                 }
   788                 }
   789             }
   789             }
   790         }
   790         }