From 3a8024b23504a2f34440d554872dea7995c71da0 Mon Sep 17 00:00:00 2001 From: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com> Date: Sat, 28 Dec 2024 23:16:08 -0800 Subject: [PATCH] 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 --- src/BizHawk.Client.EmuHawk/MainForm.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/BizHawk.Client.EmuHawk/MainForm.cs b/src/BizHawk.Client.EmuHawk/MainForm.cs index 721efba0ab9..7b22905315d 100644 --- a/src/BizHawk.Client.EmuHawk/MainForm.cs +++ b/src/BizHawk.Client.EmuHawk/MainForm.cs @@ -524,7 +524,10 @@ _argParser.SocketAddress is var (socketIP, socketPort) ResizeBegin += (o, e) => { _inResizeLoop = true; - Sound?.StopSound(); + if (!OSTailoredCode.IsUnixHost) + { + Sound?.StopSound(); + } }; Resize += (_, _) => UpdateWindowTitle(); @@ -539,7 +542,10 @@ _argParser.SocketAddress is var (socketIP, socketPort) _presentationPanel.Resized = true; } - Sound?.StartSound(); + if (!OSTailoredCode.IsUnixHost) + { + Sound?.StartSound(); + } }; Input.Instance = new Input(