mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2025-02-24 20:21:27 +00:00
Merge branch 'linux_vsync' into qzdoom
This commit is contained in:
commit
7b4df20c51
1 changed files with 10 additions and 0 deletions
|
@ -449,6 +449,16 @@ void SDLGLFB::SetVSync( bool vsync )
|
||||||
#if defined (__APPLE__)
|
#if defined (__APPLE__)
|
||||||
const GLint value = vsync ? 1 : 0;
|
const GLint value = vsync ? 1 : 0;
|
||||||
CGLSetParameter( CGLGetCurrentContext(), kCGLCPSwapInterval, &value );
|
CGLSetParameter( CGLGetCurrentContext(), kCGLCPSwapInterval, &value );
|
||||||
|
#else
|
||||||
|
if (vsync)
|
||||||
|
{
|
||||||
|
if (SDL_GL_SetSwapInterval(-1) == -1)
|
||||||
|
SDL_GL_SetSwapInterval(1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SDL_GL_SetSwapInterval(0);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue