diff --git a/src/Game.cs b/src/Game.cs index b2f2fcb..48df243 100644 --- a/src/Game.cs +++ b/src/Game.cs @@ -354,6 +354,15 @@ 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. + if (processEvents) + { + GatherSDLEvents(); + ProcessSystemEvents(); + } + // Timestep alpha should be 0 if we are in latency-optimized mode. var alpha = FramePacingSettings.Mode == FramePacingMode.LatencyOptimized ? 0 :