src/joystick/windows/SDL_xinputjoystick.c
changeset 8976 1a5d959d7b32
parent 8972 dfc759d7486f
child 8987 d0fd8420b019
equal deleted inserted replaced
8975:180271d72b1e 8976:1a5d959d7b32
   232         XINPUT_GAMEPAD_A, XINPUT_GAMEPAD_B, XINPUT_GAMEPAD_X, XINPUT_GAMEPAD_Y,
   232         XINPUT_GAMEPAD_A, XINPUT_GAMEPAD_B, XINPUT_GAMEPAD_X, XINPUT_GAMEPAD_Y,
   233         XINPUT_GAMEPAD_GUIDE
   233         XINPUT_GAMEPAD_GUIDE
   234     };
   234     };
   235     WORD wButtons = pXInputState->Gamepad.wButtons;
   235     WORD wButtons = pXInputState->Gamepad.wButtons;
   236     Uint8 button;
   236     Uint8 button;
   237     Uint8 hat = SDL_HAT_CENTERED;
       
   238 
   237 
   239     SDL_PrivateJoystickAxis(joystick, 0, (Sint16)pXInputState->Gamepad.sThumbLX);
   238     SDL_PrivateJoystickAxis(joystick, 0, (Sint16)pXInputState->Gamepad.sThumbLX);
   240     SDL_PrivateJoystickAxis(joystick, 1, (Sint16)(-SDL_max(-32767, pXInputState->Gamepad.sThumbLY)));
   239     SDL_PrivateJoystickAxis(joystick, 1, (Sint16)(-SDL_max(-32767, pXInputState->Gamepad.sThumbLY)));
   241     SDL_PrivateJoystickAxis(joystick, 2, (Sint16)pXInputState->Gamepad.sThumbRX);
   240     SDL_PrivateJoystickAxis(joystick, 2, (Sint16)pXInputState->Gamepad.sThumbRX);
   242     SDL_PrivateJoystickAxis(joystick, 3, (Sint16)(-SDL_max(-32767, pXInputState->Gamepad.sThumbRY)));
   241     SDL_PrivateJoystickAxis(joystick, 3, (Sint16)(-SDL_max(-32767, pXInputState->Gamepad.sThumbRY)));
   377 void
   376 void
   378 SDL_XINPUT_JoystickQuit(void)
   377 SDL_XINPUT_JoystickQuit(void)
   379 {
   378 {
   380 }
   379 }
   381 
   380 
   382 SDL_bool
       
   383 SDL_SYS_IsXInputGamepad_DeviceIndex(int device_index)
       
   384 {
       
   385     return SDL_FALSE;
       
   386 }
       
   387 
       
   388 #endif /* SDL_JOYSTICK_XINPUT */
   381 #endif /* SDL_JOYSTICK_XINPUT */
   389 
   382 
   390 /* vi: set ts=4 sw=4 expandtab: */
   383 /* vi: set ts=4 sw=4 expandtab: */