only try vsync, when set in config
authorMatthias Braun <matze@braunis.de>
Fri, 25 May 2007 14:15:29 +0000 (14:15 +0000)
committerMatthias Braun <matze@braunis.de>
Fri, 25 May 2007 14:15:29 +0000 (14:15 +0000)
SVN-Revision: 5010

src/main.cpp

index 8a7ba54..38180b5 100644 (file)
@@ -372,8 +372,10 @@ void init_video()
     desktop_height = info->current_h;
   }
 
-  /* we want vsync for smooth scrolling */
-  SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, 1);
+  if(config->try_vsync) {
+    /* we want vsync for smooth scrolling */
+       SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, 1);
+  }
 #endif
 
   SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);