[client] enable support for dynamic vsync

This commit is contained in:
Geoffrey McRae committed 2017-12-12 03:59:56 +11:00
1 parent 9590b58f0f
commit 7ef55134ef
1 file changed
+9
+9
View File
@@ -828,6 +828,15 @@ int run()
}
}
if (params.vsync)
{
// try for late swap tearing to help keep sync with the guest
if (SDL_GL_SetSwapInterval(-1) == -1)
SDL_GL_SetSwapInterval(1);
}
else
SDL_GL_SetSwapInterval(0);
if (!state.renderer)
{
DEBUG_ERROR("failed to create window");