mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-22 05:27:20 +00:00
[client] enable support for dynamic vsync
This commit is contained in:
parent
9590b58f0f
commit
7ef55134ef
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user