From: Alexander Monakov Date: Wed, 4 May 2011 19:30:55 +0000 (+0400) Subject: Guard SDL_GL_SWAP_CONTROL by version check X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=e9f84306368c14e5cc9f5b58ea305ae863516290;hp=56623d20eeb3e38bcc30e9a8fd02ab3bf4f7f994;p=lugaru.git Guard SDL_GL_SWAP_CONTROL by version check --- 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) {