Bugfix: incorrect index.
This commit is contained in:
parent
cc6a1a3909
commit
1e5d2643be
@ -314,7 +314,7 @@ void pollJoysticks()
|
||||
{
|
||||
XINPUT_STATE state;
|
||||
memset(&state, 0, sizeof(state));
|
||||
DWORD result = XInputGetState(joystick, &state);
|
||||
DWORD result = XInputGetState(ActiveJoysticks[joystick].Index, &state);
|
||||
event.JoystickEvent.ButtonStates = state.Gamepad.wButtons;
|
||||
// Thumb values are in [-32768, 32767]
|
||||
event.JoystickEvent.Axis[SEvent::SJoystickEvent::AXIS_V] = state.Gamepad.sThumbRX;
|
||||
|
Loading…
Reference in New Issue
Block a user