From ab24aace1156ad15ba267f30002897d56104cce9 Mon Sep 17 00:00:00 2001 From: RT Date: Fri, 17 Jul 2026 18:49:27 -0500 Subject: [PATCH] stagger mfd device flips to try and prevent studder. --- Gameleap/code/CoreTech/Libraries/GameOS/WinMain.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Gameleap/code/CoreTech/Libraries/GameOS/WinMain.cpp b/Gameleap/code/CoreTech/Libraries/GameOS/WinMain.cpp index e710d2ac..3b1682aa 100644 --- a/Gameleap/code/CoreTech/Libraries/GameOS/WinMain.cpp +++ b/Gameleap/code/CoreTech/Libraries/GameOS/WinMain.cpp @@ -1114,9 +1114,12 @@ void gos_UpdateDisplay( bool Everything ) case 3: break; case 4: - // Same 7-step cadence as mode 1. Flip all three: radar, left MFD, - // right MFD. mfd_device_right.pDDSFront is NULL if not initialised - // (e.g. g_nMFD2 = -1), so guard the flip. + // 7-step cadence. Radar + left MFD flip on step 0 (same as mode 1). + // Right MFD flip is staggered to step 1 so that three back-to-back + // DGVoodoo2 Present() calls don't all land in the same frame and + // cause rhythmic stutter on the main display. + // Right device finishes rendering at step 6 (channel 4), so + // flipping at step 1 is still correct timing. sh_step++; sh_step%=7; if(sh_step==0) { @@ -1124,6 +1127,7 @@ void gos_UpdateDisplay( bool Everything ) radar_device.pDDSFront->Flip(0,DDFLIP_DONOTWAIT|DDFLIP_NOVSYNC); mfd_device.EndScene(); mfd_device.pDDSFront->Flip(0,DDFLIP_DONOTWAIT|DDFLIP_NOVSYNC); + } else if(sh_step==1) { if (mfd_device_right.pDDSFront) mfd_device_right.pDDSFront->Flip(0,DDFLIP_DONOTWAIT|DDFLIP_NOVSYNC); }