ref: 74e939aa51f40cd1ef3b40b82cd52f0fe6949828
parent: b9b0c2abfbe194baf6d497f1c4a2165769f64ab3
author: Simon Howard <fraggle@gmail.com>
date: Sat Dec 20 15:36:52 EST 2008
Fix Hexen startup code to set window title before setting video mode (for Windows XP Luna) Subversion-branch: /branches/raven-branch Subversion-revision: 1424
--- a/src/hexen/st_start.c
+++ b/src/hexen/st_start.c
@@ -131,10 +131,11 @@
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);
--- 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 @@
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 @@
void I_SetWindowTitleHR(char *title)
{
- SDL_WM_SetCaption(title, NULL);
+ window_title = title;
}
void I_UnsetVideoModeHR(void)