summaryrefslogtreecommitdiff
path: root/platform/winrt
diff options
context:
space:
mode:
authorGeorge Marques <george@gmarqu.es>2016-09-12 23:41:34 -0300
committerGeorge Marques <george@gmarqu.es>2016-09-12 23:41:34 -0300
commit291e9858828cc7007700ac8b65179a32f9a80fe5 (patch)
treef7e7edb2371722750315b5a7fe824f4de6ea8b47 /platform/winrt
parent043a7a1e06d5f020f996080089e4742852edd37c (diff)
Fix UWP gamepad
Diffstat (limited to 'platform/winrt')
-rw-r--r--platform/winrt/joystick_winrt.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/platform/winrt/joystick_winrt.cpp b/platform/winrt/joystick_winrt.cpp
index 4816e9c831..9f93c5a26b 100644
--- a/platform/winrt/joystick_winrt.cpp
+++ b/platform/winrt/joystick_winrt.cpp
@@ -103,9 +103,10 @@ void JoystickWinrt::OnGamepadAdded(Platform::Object ^ sender, Windows::Gaming::I
controllers[idx].connected = true;
controllers[idx].controller_reference = value;
+ controllers[idx].id = idx;
controllers[idx].type = ControllerType::GAMEPAD_CONTROLLER;
- input->joy_connection_changed(idx, true, "Xbox Controller", "__WINRT_GAMEPAD__");
+ input->joy_connection_changed(controllers[idx].id, true, "Xbox Controller", "__WINRT_GAMEPAD__");
}
void JoystickWinrt::OnGamepadRemoved(Platform::Object ^ sender, Windows::Gaming::Input::Gamepad ^ value) {