Only stop/start sound on resize on Windows

Windows will "freeze" the main thread in message pumping while resizing is occurring, while this does not occur on Linux.

Resolves #4145
This commit is contained in:
CasualPokePlayer 2024-12-28 23:16:08 -08:00
parent 24d549ddb8
commit 3a8024b235
1 changed files with 8 additions and 2 deletions

View File

@ -524,7 +524,10 @@ namespace BizHawk.Client.EmuHawk
ResizeBegin += (o, e) =>
{
_inResizeLoop = true;
Sound?.StopSound();
if (!OSTailoredCode.IsUnixHost)
{
Sound?.StopSound();
}
};
Resize += (_, _) => UpdateWindowTitle();
@ -539,7 +542,10 @@ namespace BizHawk.Client.EmuHawk
_presentationPanel.Resized = true;
}
Sound?.StartSound();
if (!OSTailoredCode.IsUnixHost)
{
Sound?.StartSound();
}
};
Input.Instance = new Input(