From 662fd83f5e498a178c273ca608e0c6fcbd79fe90 Mon Sep 17 00:00:00 2001 From: CasualPokePlayer <50538166+CasualPokePlayer@users.noreply.github.com> Date: Wed, 10 Jul 2024 01:48:52 -0700 Subject: [PATCH] Prevent user changing clock stopping message pumping TODO: Audit other usages of DateTime.Now assuming it is monotonic (also use DateTime.UtcNow where applicable to avoid DST causing issues) --- src/BizHawk.Client.EmuHawk/MainForm.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/BizHawk.Client.EmuHawk/MainForm.cs b/src/BizHawk.Client.EmuHawk/MainForm.cs index 86429d4bbe..b26a154044 100644 --- a/src/BizHawk.Client.EmuHawk/MainForm.cs +++ b/src/BizHawk.Client.EmuHawk/MainForm.cs @@ -2404,7 +2404,7 @@ namespace BizHawk.Client.EmuHawk // only check window messages a maximum of once per millisecond // this check is irrelvant for the 99% of cases where fps are <1k // but gives a slight fps boost in those scenarios - if ((currentTime - _lastMessageCheck).Milliseconds > 0) + if ((uint)(currentTime - _lastMessageCheck).Milliseconds > 0) { _lastMessageCheck = currentTime; Application.DoEvents();