From 96b78a7beab91bb199b8eb5531208d646a8a40ae Mon Sep 17 00:00:00 2001 From: aemony Date: Thu, 22 Feb 2024 22:41:08 +0100 Subject: [PATCH] Spawn the gamepad thread after wnd creation --- src/SKIF.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/SKIF.cpp b/src/SKIF.cpp index 53cf207f..5e5e9d7d 100644 --- a/src/SKIF.cpp +++ b/src/SKIF.cpp @@ -1684,9 +1684,6 @@ wWinMain ( _In_ HINSTANCE hInstance, // Register service (auto-stop) hotkey SKIF_Util_RegisterHotKeySVCTemp ( ); - - // Spawn the gamepad input thread - _gamepad.SpawnChildThread ( ); } PLOG_INFO << "Initializing updater..."; @@ -3394,6 +3391,10 @@ wWinMain ( _In_ HINSTANCE hInstance, SKIF_Util_GetMonitorHzPeriod (SKIF_ImGui_hWnd, MONITOR_DEFAULTTOPRIMARY, dwDwmPeriod); //OutputDebugString((L"Initial refresh rate period: " + std::to_wstring (dwDwmPeriod) + L"\n").c_str()); + + // Spawn the gamepad input thread + if (! _Signal.Launcher && ! _Signal.LauncherURI && ! _Signal.Quit && ! _Signal.ServiceMode) + _gamepad.SpawnChildThread ( ); } }