summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorGeorge Marques <george@gmarqu.es>2017-08-07 00:07:19 -0300
committerGeorge Marques <george@gmarqu.es>2017-08-07 00:07:19 -0300
commitf89f9f00944d35aad9d2ddb22060bd4dc3c19102 (patch)
tree85e5eb4adac4457385ed37620b9e2ff537ce3223 /platform
parent7e4970214c92fec0e7262f36765764a81e28b2be (diff)
UWP: Fix Gamepad removal logic
Fix #9209
Diffstat (limited to 'platform')
-rw-r--r--platform/uwp/joypad_uwp.cpp10
1 files changed, 1 insertions, 9 deletions
diff --git a/platform/uwp/joypad_uwp.cpp b/platform/uwp/joypad_uwp.cpp
index 34e36f7b66..9495002675 100644
--- a/platform/uwp/joypad_uwp.cpp
+++ b/platform/uwp/joypad_uwp.cpp
@@ -122,15 +122,7 @@ void JoypadUWP::OnGamepadRemoved(Platform::Object ^ sender, Windows::Gaming::Inp
ERR_FAIL_COND(idx == -1);
- for (int i = idx + 1; i < MAX_CONTROLLERS - 1; i++) {
-
- if (!controllers[i].connected) {
- break;
- }
-
- controllers[i - 1] = controllers[i];
- }
- controllers[MAX_CONTROLLERS - 1] = ControllerDevice();
+ controllers[idx] = ControllerDevice();
input->joy_connection_changed(idx, false, "Xbox Controller");
}