Only wait for the display thread if the previous frame was not skipped.

This commit is contained in:
SuuperW 2018-08-18 10:57:32 -05:00
parent 2890c4b075
commit 212f0a358f
1 changed files with 6 additions and 4 deletions

View File

@ -1248,7 +1248,6 @@ static struct MainLoopData
int toolframecount;
} mainLoopData = {0};
static void StepRunLoop_Core()
{
input_acquire();
@ -1300,9 +1299,12 @@ static void StepRunLoop_User()
Hud.fps = mainLoopData.fps;
Hud.fps3d = GPU->GetFPSRender3D();
// wait for the HUD to update from last frame
if(frameskiprate==0) WaitForSingleObject(display_done_event, display_done_timeout);
Display();
if (mainLoopData.framesskipped == 0)
{
WaitForSingleObject(display_done_event, display_done_timeout);
Display();
}
ResetEvent(display_done_event);
mainLoopData.fps3d = Hud.fps3d;