mirror of
https://git.h3cjp.net/H3cJP/yuzu.git
synced 2024-11-15 16:12:46 +00:00
input_common: Fix crash when controller disconnects
This commit is contained in:
parent
85eeae7aad
commit
edd498f6e0
|
@ -267,7 +267,9 @@ void SDLState::CloseJoystick(SDL_Joystick* sdl_joystick) {
|
||||||
return joystick->GetSDLJoystick() == sdl_joystick;
|
return joystick->GetSDLJoystick() == sdl_joystick;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (joystick_it != joystick_guid_list.end()) {
|
||||||
(*joystick_it)->SetSDLJoystick(nullptr, nullptr);
|
(*joystick_it)->SetSDLJoystick(nullptr, nullptr);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SDLState::HandleGameControllerEvent(const SDL_Event& event) {
|
void SDLState::HandleGameControllerEvent(const SDL_Event& event) {
|
||||||
|
|
Loading…
Reference in a new issue