summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerInterface
diff options
context:
space:
mode:
authorJMC47 <JMC4789@gmail.com>2025-09-26 16:13:49 -0400
committerGitHub <noreply@github.com>2025-09-26 16:13:49 -0400
commitfa74c40e78071ede256db083f4cc6a6bf8c388a3 (patch)
tree0e984a199167dc98cba331a98d7c2a91e0644ac0 /Source/Core/InputCommon/ControllerInterface
parenta8fe5c030319747e7d7ff05e8aab6839bad561a3 (diff)
parentcee9360e4b5d6e31407c3cfe30438b1f8b6e7a10 (diff)
Merge pull request #13882 from jordan-woyak/sdl-win32-msg
SDL: Remove old Windows joystick bug workarounds.
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface')
-rw-r--r--Source/Core/InputCommon/ControllerInterface/SDL/SDL.cpp26
1 files changed, 0 insertions, 26 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/SDL/SDL.cpp b/Source/Core/InputCommon/ControllerInterface/SDL/SDL.cpp
index 8e4043f4a9..da6e829bd1 100644
--- a/Source/Core/InputCommon/ControllerInterface/SDL/SDL.cpp
+++ b/Source/Core/InputCommon/ControllerInterface/SDL/SDL.cpp
@@ -130,9 +130,6 @@ InputBackend::InputBackend(ControllerInterface* controller_interface)
{
EnableSDLLogging();
- // This is required on windows so that SDL's joystick code properly pumps window messages
- SDL_SetHint(SDL_HINT_JOYSTICK_THREAD, "1");
-
SDL_SetHint(SDL_HINT_JOYSTICK_ENHANCED_REPORTS, "1");
// We have our own WGI backend. Enabling SDL's WGI handling creates even more redundant devices.
@@ -177,34 +174,11 @@ InputBackend::InputBackend(ControllerInterface* controller_interface)
}
}
-#ifdef _WIN32
- // This is a hack to workaround SDL_hidapi using window messages to detect device
- // removal/arrival, yet no part of SDL pumps messages for it. It can hopefully be removed in the
- // future when SDL fixes the issue. Note this is a separate issue from SDL_HINT_JOYSTICK_THREAD.
- // Also note that SDL_WaitEvent may block while device detection window messages get queued up,
- // causing some noticible stutter. This is just another reason it should be fixed properly by
- // SDL...
- const auto window_handle =
- FindWindowEx(HWND_MESSAGE, nullptr, TEXT("SDL_HIDAPI_DEVICE_DETECTION"), nullptr);
-#endif
-
SDL_Event e;
while (SDL_WaitEvent(&e))
{
if (!HandleEventAndContinue(e))
return;
-
-#ifdef _WIN32
- MSG msg;
- while (window_handle && PeekMessage(&msg, window_handle, 0, 0, PM_NOREMOVE))
- {
- if (GetMessageA(&msg, window_handle, 0, 0) != 0)
- {
- TranslateMessage(&msg);
- DispatchMessage(&msg);
- }
- }
-#endif
}
});