mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 05:19:56 +00:00
SDL: Ignore audio switch events in first second.
We get new device events right on start, which makes auto switch away from the preferred / most recent device otherwise. Fixes #12536.
This commit is contained in:
parent
0a5ec48382
commit
9989c51f21
@ -910,7 +910,9 @@ int main(int argc, char *argv[]) {
|
||||
if (!name) {
|
||||
break;
|
||||
}
|
||||
if (g_Config.bAutoAudioDevice || g_Config.sAudioDevice == name) {
|
||||
// Don't start auto switching for a second, because some devices init on start.
|
||||
bool doAutoSwitch = g_Config.bAutoAudioDevice && framecount > 60;
|
||||
if (doAutoSwitch || g_Config.sAudioDevice == name) {
|
||||
StopSDLAudioDevice();
|
||||
InitSDLAudioDevice(name ? name : "");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user