From: Alexander Monakov Date: Mon, 2 May 2011 15:40:52 +0000 (+0400) Subject: Set swap interval via SDL, enable by default X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=56623d20eeb3e38bcc30e9a8fd02ab3bf4f7f994;p=lugaru.git Set swap interval via SDL, enable by default --- diff --git a/Source/GameTick.cpp b/Source/GameTick.cpp index 7e231e0..b30d4f1 100644 --- a/Source/GameTick.cpp +++ b/Source/GameTick.cpp @@ -106,7 +106,6 @@ extern bool texttoggle; extern bool alwaysblur; extern float gamespeed; extern bool decals; -extern bool vblsync; extern bool immediate; extern bool velocityblur; extern float tintr,tintg,tintb; diff --git a/Source/OpenGL_Windows.cpp b/Source/OpenGL_Windows.cpp index f5aed92..5d73e7a 100644 --- a/Source/OpenGL_Windows.cpp +++ b/Source/OpenGL_Windows.cpp @@ -296,6 +296,7 @@ Boolean SetUp (Game & game) SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1); SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, 1); + SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, vblsync); if (SDL_SetVideoMode(kContextWidth, kContextHeight, 0, sdlflags) == NULL) { diff --git a/Source/Settings.cpp b/Source/Settings.cpp index 26a404c..71b7581 100644 --- a/Source/Settings.cpp +++ b/Source/Settings.cpp @@ -28,7 +28,7 @@ void DefaultSettings(Game &game) { velocityblur=0; volume = 0.8f; ambientsound=1; - vblsync=0; + vblsync=1; debugmode=0; game.crouchkey=SDLK_LSHIFT;