Skip to content

Commit

Permalink
GL|Fixed: Always apply frame rate limiting if requested
Browse files Browse the repository at this point in the history
If the requested refresh rate is lower than what the system is capable
of producing, an additional wait is applied right before showing the
frame.
  • Loading branch information
skyjake committed May 4, 2012
1 parent 0b6d12e commit 0a75960
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions doomsday/engine/portable/src/gl_main.c
Expand Up @@ -221,13 +221,10 @@ void GL_DoUpdate(void)
LIBDENG_ASSERT_IN_MAIN_THREAD();
LIBDENG_ASSERT_GL_CONTEXT_ACTIVE();

if(Window_ShouldRepaintManually(Window_Main()))
{
// Wait until the right time to show the frame so that the realized
// frame rate is exactly right.
glFlush();
DD_WaitForOptimalUpdateTime();
}
// Wait until the right time to show the frame so that the realized
// frame rate is exactly right.
glFlush();
DD_WaitForOptimalUpdateTime();

// Blit screen to video.
Window_SwapBuffers(theWindow);
Expand Down

0 comments on commit 0a75960

Please sign in to comment.