From 1e5d2643beef2c737cc4d27c9add2b8644ba7dd4 Mon Sep 17 00:00:00 2001 From: hiker Date: Wed, 2 Aug 2017 08:13:04 +1000 Subject: [PATCH] Bugfix: incorrect index. --- lib/irrlicht/source/Irrlicht/CIrrDeviceWin32.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/irrlicht/source/Irrlicht/CIrrDeviceWin32.cpp b/lib/irrlicht/source/Irrlicht/CIrrDeviceWin32.cpp index 168f6fb82..2138ab7c2 100644 --- a/lib/irrlicht/source/Irrlicht/CIrrDeviceWin32.cpp +++ b/lib/irrlicht/source/Irrlicht/CIrrDeviceWin32.cpp @@ -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;