Fix switching of audio devices on Windows.

Fixes #21337
This commit is contained in:
Henrik Rydgård committed 2026-03-04 14:41:59 +01:00
1 parent 892ef99daa
commit 2052ebc60c
8 files changed
+93 -26

No files matched your search

+1 -1
View File
@@ -1290,7 +1290,7 @@ static void ProcessSDLEvent(SDL_Window *window, const SDL_Event &event, InputSta
break;
}
// Don't start auto switching for a couple of seconds, because some devices init on start.
bool doAutoSwitch = g_Config.bAutoAudioDevice;
bool doAutoSwitch = g_Config.bAutoSwitchAudioDevice;
if ((time_now_d() - g_audioStartTime) < 3.0) {
INFO_LOG(Log::Audio, "Ignoring new audio device: %s (current: %s)", name, g_Config.sAudioDevice.c_str());
doAutoSwitch = false;