foxygit / doom Log in
commit fd0c011dcc9d56d366d62c38695d5e8dd47643c7
Author:     Samuel Villareal <svkaiser@gmail.com>
AuthorDate: Sun Sep 19 18:17:26 2010 +0000
Commit:     Samuel Villareal <svkaiser@gmail.com>
CommitDate: Sun Sep 19 18:17:26 2010 +0000

    + SetVideoMode - center window on desktop when not in fullscreen mode

    Subversion-branch: /branches/strife-branch
    Subversion-revision: 2117
---
 src/i_video.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/i_video.c b/src/i_video.c
index 733af899..8c2cfeac 100644
--- a/src/i_video.c
+++ b/src/i_video.c
@@ -1761,6 +1761,8 @@ static void SetVideoMode(screen_mode_t *mode, int w, int h)
     else
     {
         flags |= SDL_RESIZABLE;
+        // villsa - center window
+        SDL_putenv("SDL_VIDEO_CENTERED=1");
     }

     screen = SDL_SetVideoMode(w, h, 8, flags);