Skip to content

Commit

Permalink
Windows|GL|Client: Update Qt to control swap interval (vsync)
Browse files Browse the repository at this point in the history
IssueID #1712
  • Loading branch information
skyjake committed Mar 16, 2014
1 parent 8d16231 commit 33de83f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
6 changes: 5 additions & 1 deletion doomsday/client/src/gl/gl_main.cpp
Expand Up @@ -97,14 +97,18 @@ static viewport_t currentView;
static void videoFSAAChanged()
{
if(novideo || !WindowSystem::mainExists()) return;
ClientWindowSystem::main().updateCanvasFormat();
ClientWindow::main().updateCanvasFormat();
}

static void videoVsyncChanged()
{
if(novideo || !WindowSystem::mainExists()) return;

#ifdef WIN32
ClientWindow::main().updateCanvasFormat();
#else
GL_SetVSync(Con_GetByte("vid-vsync") != 0);
#endif
}

void GL_Register()
Expand Down
8 changes: 3 additions & 5 deletions doomsday/client/src/ui/clientwindow.cpp
Expand Up @@ -862,18 +862,16 @@ bool ClientWindow::setDefaultGLFormat() // static
fmt.setStereo(true);
}

/*
#ifdef WIN32
if(CommandLine_Exists("-novsync") || !Con_GetByte("vid-vsync"))
{
fmt.setSwapInterval(0); // vsync off
LOG_GL_VERBOSE("Vertical sync off");
fmt.setSwapInterval(0);
}
else
{
fmt.setSwapInterval(1);
LOG_GL_VERBOSE("Vertical sync on");
}
*/
#endif

// The value of the "vid-fsaa" variable is written to this settings
// key when the value of the variable changes.
Expand Down

0 comments on commit 33de83f

Please sign in to comment.