summaryrefslogtreecommitdiffstats
path: root/src/input_common/sdl
diff options
context:
space:
mode:
authorgerman77 <juangerman-13@hotmail.com>2021-05-15 04:56:39 +0200
committergerman77 <juangerman-13@hotmail.com>2021-05-15 15:27:19 +0200
commitedd498f6e0c8343a1368bdb49f5f8a4919ff89f0 (patch)
tree76547cf8bbc661a421b89969f1d07fe52d52942c /src/input_common/sdl
parentinput_common: Rewrite sdl analog mapping (diff)
downloadyuzu-edd498f6e0c8343a1368bdb49f5f8a4919ff89f0.tar
yuzu-edd498f6e0c8343a1368bdb49f5f8a4919ff89f0.tar.gz
yuzu-edd498f6e0c8343a1368bdb49f5f8a4919ff89f0.tar.bz2
yuzu-edd498f6e0c8343a1368bdb49f5f8a4919ff89f0.tar.lz
yuzu-edd498f6e0c8343a1368bdb49f5f8a4919ff89f0.tar.xz
yuzu-edd498f6e0c8343a1368bdb49f5f8a4919ff89f0.tar.zst
yuzu-edd498f6e0c8343a1368bdb49f5f8a4919ff89f0.zip
Diffstat (limited to 'src/input_common/sdl')
-rw-r--r--src/input_common/sdl/sdl_impl.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/input_common/sdl/sdl_impl.cpp b/src/input_common/sdl/sdl_impl.cpp
index c918a333d..288557968 100644
--- a/src/input_common/sdl/sdl_impl.cpp
+++ b/src/input_common/sdl/sdl_impl.cpp
@@ -267,7 +267,9 @@ void SDLState::CloseJoystick(SDL_Joystick* 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) {