]> git.jsancho.org Git - lugaru.git/commitdiff
Set swap interval via SDL, enable by default
authorAlexander Monakov <amonakov@gmail.com>
Mon, 2 May 2011 15:40:52 +0000 (19:40 +0400)
committerAlexander Monakov <amonakov@gmail.com>
Mon, 2 May 2011 15:40:52 +0000 (19:40 +0400)
Source/GameTick.cpp
Source/OpenGL_Windows.cpp
Source/Settings.cpp

index 7e231e0a03f508604dec7a56b2936c002da850e2..b30d4f1d04b6dbe2e6b6507b9bcefac67f759751 100644 (file)
@@ -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;
index f5aed92e9a0851d151ef68d4a57d5f28ac0cd747..5d73e7a139c3e20217204ff9ec26082460baa005 100644 (file)
@@ -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)
     {
index 26a404c5f6dd57480dd9ccf563237e99c73f013f..71b7581bd77ce6683c386e20a582a8100ba79e77 100644 (file)
@@ -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;