Skip to content

Commit

Permalink
Only stop/start sound on resize on Windows
Browse files Browse the repository at this point in the history
Windows will "freeze" the main thread in message pumping while resizing is occurring, while this does not occur on Linux.

Resolves #4145
  • Loading branch information
CasualPokePlayer committed Dec 29, 2024
1 parent 24d549d commit 3a8024b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/BizHawk.Client.EmuHawk/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,10 @@ _argParser.SocketAddress is var (socketIP, socketPort)
ResizeBegin += (o, e) =>
{
_inResizeLoop = true;
Sound?.StopSound();
if (!OSTailoredCode.IsUnixHost)
{
Sound?.StopSound();
}
};

Resize += (_, _) => UpdateWindowTitle();
Expand All @@ -539,7 +542,10 @@ _argParser.SocketAddress is var (socketIP, socketPort)
_presentationPanel.Resized = true;
}

Sound?.StartSound();
if (!OSTailoredCode.IsUnixHost)
{
Sound?.StartSound();
}
};

Input.Instance = new Input(
Expand Down

0 comments on commit 3a8024b

Please sign in to comment.