mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-06 09:56:26 +00:00
Use XINPUT_STATE instead of XINPUT_STATE_EX (thanks Andrew!)
XINPUT_STATE_EX isn't actually a thing, we can just use the normal XINPUT_STATE
Fixes https://github.com/libsdl-org/SDL/issues/2797
(cherry picked from commit e8f4045d0b
)
This commit is contained in:
@@ -421,7 +421,7 @@ static void UpdateXInputJoystickBatteryInformation(SDL_Joystick *joystick, XINPU
|
||||
}
|
||||
}
|
||||
|
||||
static void UpdateXInputJoystickState_OLD(SDL_Joystick *joystick, XINPUT_STATE_EX *pXInputState, XINPUT_BATTERY_INFORMATION_EX *pBatteryInformation)
|
||||
static void UpdateXInputJoystickState_OLD(SDL_Joystick *joystick, XINPUT_STATE *pXInputState, XINPUT_BATTERY_INFORMATION_EX *pBatteryInformation)
|
||||
{
|
||||
static WORD s_XInputButtons[] = {
|
||||
XINPUT_GAMEPAD_DPAD_UP, XINPUT_GAMEPAD_DPAD_DOWN, XINPUT_GAMEPAD_DPAD_LEFT, XINPUT_GAMEPAD_DPAD_RIGHT,
|
||||
@@ -448,7 +448,7 @@ static void UpdateXInputJoystickState_OLD(SDL_Joystick *joystick, XINPUT_STATE_E
|
||||
UpdateXInputJoystickBatteryInformation(joystick, pBatteryInformation);
|
||||
}
|
||||
|
||||
static void UpdateXInputJoystickState(SDL_Joystick *joystick, XINPUT_STATE_EX *pXInputState, XINPUT_BATTERY_INFORMATION_EX *pBatteryInformation)
|
||||
static void UpdateXInputJoystickState(SDL_Joystick *joystick, XINPUT_STATE *pXInputState, XINPUT_BATTERY_INFORMATION_EX *pBatteryInformation)
|
||||
{
|
||||
static WORD s_XInputButtons[] = {
|
||||
XINPUT_GAMEPAD_A, XINPUT_GAMEPAD_B, XINPUT_GAMEPAD_X, XINPUT_GAMEPAD_Y,
|
||||
@@ -513,7 +513,7 @@ Uint32 SDL_XINPUT_JoystickGetCapabilities(SDL_Joystick *joystick)
|
||||
void SDL_XINPUT_JoystickUpdate(SDL_Joystick *joystick)
|
||||
{
|
||||
HRESULT result;
|
||||
XINPUT_STATE_EX XInputState;
|
||||
XINPUT_STATE XInputState;
|
||||
XINPUT_BATTERY_INFORMATION_EX XBatteryInformation;
|
||||
|
||||
if (!XINPUTGETSTATE) {
|
||||
|
Reference in New Issue
Block a user