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
No known key found for this signature in database
GPG key ID: 046BD46A3201E43D

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