From 2a27edf8a37afd2a542aef560c912777c186223c Mon Sep 17 00:00:00 2001 From: "Alejandro V. Garcia" Date: Thu, 14 Jan 2010 13:08:12 +0000 Subject: [PATCH] Center window at startup when using the -t switch in MS Windows git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@4768 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/main.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/source/src/main.cpp b/source/src/main.cpp index f08b9097..fad9fa10 100644 --- a/source/src/main.cpp +++ b/source/src/main.cpp @@ -384,6 +384,7 @@ void setupscreen(int &usedcolorbits, int &useddepthbits, int &usedfsaa) int flags = SDL_RESIZABLE; #if defined(WIN32) || defined(__APPLE__) flags = 0; + putenv("SDL_VIDEO_CENTERED=1"); //Center window #endif if(fullscreen) flags |= SDL_FULLSCREEN; SDL_Rect **modes = SDL_ListModes(NULL, SDL_OPENGL|flags);