Fix UWP gamepad
This commit is contained in:
parent
043a7a1e06
commit
291e985882
|
@ -103,9 +103,10 @@ void JoystickWinrt::OnGamepadAdded(Platform::Object ^ sender, Windows::Gaming::I
|
||||||
|
|
||||||
controllers[idx].connected = true;
|
controllers[idx].connected = true;
|
||||||
controllers[idx].controller_reference = value;
|
controllers[idx].controller_reference = value;
|
||||||
|
controllers[idx].id = idx;
|
||||||
controllers[idx].type = ControllerType::GAMEPAD_CONTROLLER;
|
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) {
|
void JoystickWinrt::OnGamepadRemoved(Platform::Object ^ sender, Windows::Gaming::Input::Gamepad ^ value) {
|
||||||
|
|
Loading…
Reference in New Issue