about summary refs log tree commit diff
path: root/src/engine
diff options
context:
space:
mode:
authorMagnus Auvinen <magnus.auvinen@gmail.com>2009-01-21 20:55:07 +0000
committerMagnus Auvinen <magnus.auvinen@gmail.com>2009-01-21 20:55:07 +0000
commit0c9dfd81fdd5752bad476bfd3332d6213fbb15da (patch)
treec52155469e8ddcdc3b1c423e42d262dcb48a4f75 /src/engine
parentd3928f559fbad11ad43114f5b1fc54aeeeeb5b3f (diff)
downloadzcatch-0c9dfd81fdd5752bad476bfd3332d6213fbb15da.tar.gz
zcatch-0c9dfd81fdd5752bad476bfd3332d6213fbb15da.zip
fixed vsync option
Diffstat (limited to 'src/engine')
-rw-r--r--src/engine/client/ec_gfx.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/engine/client/ec_gfx.c b/src/engine/client/ec_gfx.c
index 5a61f7c7..64840b2b 100644
--- a/src/engine/client/ec_gfx.c
+++ b/src/engine/client/ec_gfx.c
@@ -194,6 +194,7 @@ static int try_init()
 	}
 
 	SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
+	SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, config.gfx_vsync);
 
 	/* set caption */
 	SDL_WM_SetCaption("Teeworlds", "Teeworlds");
@@ -258,7 +259,7 @@ int gfx_init()
     }
 	
     atexit(SDL_Quit);
-	
+
 	if(!no_gfx)
 	{
 		#ifdef CONF_FAMILY_WINDOWS
@@ -326,8 +327,6 @@ int gfx_init()
 	/*if(config.dbg_stress)
 		gfx_minimize();*/
 
-	/* set vsync as needed */
-	gfx_set_vsync(config.gfx_vsync);
 	return 0;
 }
 
@@ -416,11 +415,6 @@ int gfx_get_video_modes(VIDEO_MODE *list, int maxcount)
 	return num_modes;
 }
 
-void gfx_set_vsync(int val)
-{
-	/* TODO: SDL*/
-}
-
 int gfx_unload_texture(int index)
 {
 	if(index == invalid_texture)