mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-12 00:47:58 -05:00
input_common: Fix crash when controller disconnects
This commit is contained in:
@ -267,7 +267,9 @@ void SDLState::CloseJoystick(SDL_Joystick* sdl_joystick) {
|
|||||||
return joystick->GetSDLJoystick() == sdl_joystick;
|
return joystick->GetSDLJoystick() == sdl_joystick;
|
||||||
});
|
});
|
||||||
|
|
||||||
(*joystick_it)->SetSDLJoystick(nullptr, nullptr);
|
if (joystick_it != joystick_guid_list.end()) {
|
||||||
|
(*joystick_it)->SetSDLJoystick(nullptr, nullptr);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SDLState::HandleGameControllerEvent(const SDL_Event& event) {
|
void SDLState::HandleGameControllerEvent(const SDL_Event& event) {
|
||||||
|
Reference in New Issue
Block a user