From e9f84306368c14e5cc9f5b58ea305ae863516290 Mon Sep 17 00:00:00 2001 From: Alexander Monakov Date: Wed, 4 May 2011 23:30:55 +0400 Subject: [PATCH] Guard SDL_GL_SWAP_CONTROL by version check --- Source/OpenGL_Windows.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Source/OpenGL_Windows.cpp b/Source/OpenGL_Windows.cpp index 5d73e7a..23a5f1a 100644 --- a/Source/OpenGL_Windows.cpp +++ b/Source/OpenGL_Windows.cpp @@ -296,7 +296,9 @@ Boolean SetUp (Game & game) SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1); SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, 1); +#if SDL_VERSION_ATLEAST(1, 2, 10) SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, vblsync); +#endif if (SDL_SetVideoMode(kContextWidth, kContextHeight, 0, sdlflags) == NULL) { -- 2.39.5