1
0
mirror of https://github.com/godotengine/godot.git synced 2026-01-03 19:11:41 +00:00

UWP: Fix Gamepad removal logic

Fix #9209
This commit is contained in:
George Marques
2017-08-07 00:07:19 -03:00
parent 7e4970214c
commit f89f9f0094

View File

@@ -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");
}