Use SDL_GL_SWAP_CONTROL to control vsync on non-Windows. Fixes #520.
This was SVN commit r7845.
This commit is contained in:
parent
65bcedb9fc
commit
51d0abbf2a
@ -54,7 +54,8 @@ LIB_API void SDL_Quit();
|
||||
typedef enum
|
||||
{
|
||||
SDL_GL_DEPTH_SIZE,
|
||||
SDL_GL_DOUBLEBUFFER // ignored - always double buffered
|
||||
SDL_GL_DOUBLEBUFFER, // ignored - always double buffered
|
||||
SDL_GL_SWAP_CONTROL // not implemented yet
|
||||
}
|
||||
SDL_GLattr;
|
||||
|
||||
|
@ -120,6 +120,7 @@ bool CVideoMode::InitSDL()
|
||||
|
||||
SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24);
|
||||
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
|
||||
SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, g_VSync ? 1 : 0);
|
||||
|
||||
if (!SetVideoMode(w, h, bpp, m_ConfigFullscreen))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user