diff options
| author | Jordan Woyak <jordan.woyak@gmail.com> | 2025-10-02 03:21:33 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-02 03:21:33 -0500 |
| commit | cd84d58a1a3834b09d91026f6e70a1e8b0ee200a (patch) | |
| tree | 5367cf119b6c6e48c4010d0b6e5745a993917eee /Source/Core/InputCommon/ControllerInterface/SDL | |
| parent | 3dc078c7e21f7ffc8271dcb4137d50c291f73e9b (diff) | |
| parent | c11132d2a602a3efe1a63aa4ebdbe6569d199189 (diff) | |
Merge pull request #13982 from jordan-woyak/sdl-disable-dinput
SDL: Disable DirectInput handling to work around hangs on shutdown.
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/SDL')
| -rw-r--r-- | Source/Core/InputCommon/ControllerInterface/SDL/SDL.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/SDL/SDL.cpp b/Source/Core/InputCommon/ControllerInterface/SDL/SDL.cpp index da6e829bd1..2778066084 100644 --- a/Source/Core/InputCommon/ControllerInterface/SDL/SDL.cpp +++ b/Source/Core/InputCommon/ControllerInterface/SDL/SDL.cpp @@ -16,6 +16,7 @@ #include "Common/Event.h" #include "Common/Logging/Log.h" #include "Common/ScopeGuard.h" +#include "Common/Thread.h" #include "InputCommon/ControllerInterface/ControllerInterface.h" #include "InputCommon/ControllerInterface/SDL/SDLGamepad.h" @@ -138,7 +139,15 @@ InputBackend::InputBackend(ControllerInterface* controller_interface) // Disable DualSense Player LEDs; We already colorize the Primary LED SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_PS5_PLAYER_LED, "0"); + // Disabling DirectInput support apparently solves hangs on shutdown for users with + // "8BitDo Ultimate 2" controllers. + // It also works around a possibly related random hang on a IDirectInputDevice8_Acquire + // call within SDL. + SDL_SetHint(SDL_HINT_JOYSTICK_DIRECTINPUT, "0"); + m_hotplug_thread = std::thread([this] { + Common::SetCurrentThreadName("SDL Hotplug Thread"); + Common::ScopeGuard quit_guard([] { // TODO: there seems to be some sort of memory leak with SDL, quit isn't freeing everything up SDL_Quit(); |
