From c7f11628a85ed43525c838f217b13a460b8d72c2 Mon Sep 17 00:00:00 2001 From: Demorome <69116996+Demorome@users.noreply.github.com> Date: Sat, 10 Jan 2026 23:08:53 -0400 Subject: [PATCH 1/2] process system events before drawing --- src/Game.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Game.cs b/src/Game.cs index b2f2fcb..631107c 100644 --- a/src/Game.cs +++ b/src/Game.cs @@ -354,6 +354,12 @@ private void Tick(bool processEvents) AudioDevice.WakeThread(); + // Gather and process system events before drawing. + // This is to handle changes to the window, to ensure rendering info is up-to-date. + // We could've missed such an update during busy game update loops, especially when catching up. + GatherSDLEvents(); + ProcessSystemEvents(); + // Timestep alpha should be 0 if we are in latency-optimized mode. var alpha = FramePacingSettings.Mode == FramePacingMode.LatencyOptimized ? 0 : From 7fa6ef89c571bef57a74d9be58266a82a5af6235 Mon Sep 17 00:00:00 2001 From: Demorome <69116996+Demorome@users.noreply.github.com> Date: Sat, 10 Jan 2026 23:18:31 -0400 Subject: [PATCH 2/2] fix missing `processEvents` check --- src/Game.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Game.cs b/src/Game.cs index 631107c..48df243 100644 --- a/src/Game.cs +++ b/src/Game.cs @@ -357,8 +357,11 @@ private void Tick(bool processEvents) // Gather and process system events before drawing. // This is to handle changes to the window, to ensure rendering info is up-to-date. // We could've missed such an update during busy game update loops, especially when catching up. - GatherSDLEvents(); - ProcessSystemEvents(); + if (processEvents) + { + GatherSDLEvents(); + ProcessSystemEvents(); + } // Timestep alpha should be 0 if we are in latency-optimized mode. var alpha = FramePacingSettings.Mode == FramePacingMode.LatencyOptimized ?