foxygit / doom Log in
commit 74e939aa51f40cd1ef3b40b82cd52f0fe6949828
Author:     Simon Howard <fraggle@gmail.com>
AuthorDate: Sat Dec 20 20:36:52 2008 +0000
Commit:     Simon Howard <fraggle@gmail.com>
CommitDate: Sat Dec 20 20:36:52 2008 +0000

    Fix Hexen startup code to set window title before setting video mode
    (for Windows XP Luna)

    Subversion-branch: /branches/raven-branch
    Subversion-revision: 1424
---
 src/hexen/st_start.c | 3 ++-
 src/i_videohr.c      | 5 ++++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/hexen/st_start.c b/src/hexen/st_start.c
index 47e926e5..cd89484b 100644
--- a/src/hexen/st_start.c
+++ b/src/hexen/st_start.c
@@ -131,10 +131,11 @@ void ST_Init(void)

     if (graphical_startup && !debugmode)
     {
+        I_SetWindowTitleHR("Hexen startup - " PACKAGE_STRING);
+
         // Set 640x480x16 mode
         if (I_SetVideoModeHR())
         {
-            I_SetWindowTitleHR("Hexen startup - " PACKAGE_STRING);
             using_graphical_startup = true;

             S_StartSongName("orb", true);
diff --git a/src/i_videohr.c b/src/i_videohr.c
index 8cd11e7e..94fc5309 100644
--- a/src/i_videohr.c
+++ b/src/i_videohr.c
@@ -38,6 +38,7 @@
 #define HR_SCREENHEIGHT 480

 static SDL_Surface *hr_surface = NULL;
+static char *window_title = "";

 boolean I_SetVideoModeHR(void)
 {
@@ -48,6 +49,8 @@ boolean I_SetVideoModeHR(void)
         return false;
     }

+    SDL_WM_SetCaption(window_title,  NULL);
+
     flags = SDL_SWSURFACE | SDL_HWPALETTE | SDL_DOUBLEBUF;

     hr_surface = SDL_SetVideoMode(HR_SCREENWIDTH, HR_SCREENHEIGHT, 8, flags);
@@ -63,7 +66,7 @@ boolean I_SetVideoModeHR(void)

 void I_SetWindowTitleHR(char *title)
 {
-    SDL_WM_SetCaption(title,  NULL);
+    window_title = title;
 }

 void I_UnsetVideoModeHR(void)