about summary refs log tree commit diff
path: root/src/engine/client/ec_gfx.c
diff options
context:
space:
mode:
authorMagnus Auvinen <magnus.auvinen@gmail.com>2009-05-31 09:44:20 +0000
committerMagnus Auvinen <magnus.auvinen@gmail.com>2009-05-31 09:44:20 +0000
commit4bb1df318905f491740f4298c69cda317fb53fcb (patch)
tree486c4edf2d6af2089ffab60a7422d5e7abefa891 /src/engine/client/ec_gfx.c
parentb28ede2da2c42643c5aa710a8076f0249d48c9e4 (diff)
downloadzcatch-4bb1df318905f491740f4298c69cda317fb53fcb.tar.gz
zcatch-4bb1df318905f491740f4298c69cda317fb53fcb.zip
moved 0.5 branch to trunk
Diffstat (limited to 'src/engine/client/ec_gfx.c')
-rw-r--r--src/engine/client/ec_gfx.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/src/engine/client/ec_gfx.c b/src/engine/client/ec_gfx.c
index 64840b2b..97dced87 100644
--- a/src/engine/client/ec_gfx.c
+++ b/src/engine/client/ec_gfx.c
@@ -252,11 +252,24 @@ int gfx_init()
 	if(config.dbg_stress)
 		no_gfx = 1;
 
-	if(SDL_Init(SDL_INIT_AUDIO|SDL_INIT_VIDEO) < 0)
 	{
-        dbg_msg("gfx", "unable to init SDL: %s", SDL_GetError());
-        return -1;
-    }
+		int systems = 0;
+		
+		if(!no_gfx)
+			systems |= SDL_INIT_VIDEO;
+			
+		if(config.snd_enable)
+			systems |= SDL_INIT_AUDIO;
+
+		if(config.cl_eventthread)
+			systems |= SDL_INIT_EVENTTHREAD;
+		
+		if(SDL_Init(systems) < 0)
+		{
+			dbg_msg("gfx", "unable to init SDL: %s", SDL_GetError());
+			return -1;
+		}
+	}
 	
     atexit(SDL_Quit);