From 56623d20eeb3e38bcc30e9a8fd02ab3bf4f7f994 Mon Sep 17 00:00:00 2001 From: Alexander Monakov Date: Mon, 2 May 2011 19:40:52 +0400 Subject: [PATCH] Set swap interval via SDL, enable by default --- Source/GameTick.cpp | 1 - Source/OpenGL_Windows.cpp | 1 + Source/Settings.cpp | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) 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; -- 2.39.5