stagger mfd device flips to try and prevent studder.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user