Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/Game.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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 :
Expand Down