diff --git a/platform/windows/joypad_windows.cpp b/platform/windows/joypad_windows.cpp index 432060f4fe9..53ce342e8cb 100644 --- a/platform/windows/joypad_windows.cpp +++ b/platform/windows/joypad_windows.cpp @@ -334,7 +334,7 @@ void JoypadWindows::process_joypads() { if (joy.state.dwPacketNumber != joy.last_packet) { int button_mask = XINPUT_GAMEPAD_DPAD_UP; - for (int j = 0; j <= 16; i++) { + for (int j = 0; j <= 16; j++) { input->joy_button(joy.id, j, joy.state.Gamepad.wButtons & button_mask); button_mask = button_mask * 2;