Fixed HIDAPI hotplug detection in applications that don't initialize video

This commit is contained in:
Sam Lantinga
2026-02-11 09:11:37 -08:00
parent d3f9899df5
commit eaeca340f3
3 changed files with 9 additions and 1 deletions

View File

@@ -388,7 +388,7 @@ static void HIDAPI_UpdateDiscovery(void)
}
#if defined(SDL_PLATFORM_WIN32) || defined(SDL_PLATFORM_WINGDK)
if (SDL_IsMainThread()) {
if (SDL_IsVideoThread()) {
// just let the usual SDL_PumpEvents loop dispatch these, fixing bug 2998. --ryan.
} else {
// We'll only get messages on the same thread that created the window