No longer forcing centered window position. SF.net Bug #3138446

This commit is contained in:
William Kendrick 2010-12-17 17:47:37 +00:00
parent f7f347541f
commit 1f1304c662
2 changed files with 16 additions and 3 deletions

View file

@ -21845,7 +21845,12 @@ static void setup(void)
if (!fullscreen)
{
putenv((char *) "SDL_VIDEO_WINDOW_POS=center");
int set_window_pos = 0;
if (getenv((char *) "SDL_VIDEO_WINDOW_POS") == NULL)
{
set_window_pos = 1;
putenv((char *) "SDL_VIDEO_WINDOW_POS=center");
}
#ifdef USE_HWSURFACE
screen = SDL_SetVideoMode(WINDOW_WIDTH, WINDOW_HEIGHT,
@ -21855,7 +21860,8 @@ static void setup(void)
VIDEO_BPP, SDL_SWSURFACE);
#endif
putenv((char *) "SDL_VIDEO_WINDOW_POS=nopref");
if (set_window_pos)
putenv((char *) "SDL_VIDEO_WINDOW_POS=nopref");
}
if (screen == NULL)