From 5af0b0450d5e7ae30ec6cef585f1f5c4ef4dddce Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Fri, 20 Sep 2013 23:50:44 +0000 Subject: Set setup tool title so that it it shows the name of the correct game being configured, not just always "Chocolate Doom". Subversion-branch: /branches/v2-branch Subversion-revision: 2669 --- src/setup/mainmenu.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'src/setup/mainmenu.c') diff --git a/src/setup/mainmenu.c b/src/setup/mainmenu.c index 74e77fd5..8e5ebdad 100644 --- a/src/setup/mainmenu.c +++ b/src/setup/mainmenu.c @@ -31,6 +31,8 @@ #include "m_argv.h" #include "m_config.h" #include "m_controls.h" +#include "m_misc.h" +#include "z_zone.h" #include "setup_icon.c" #include "mode.h" @@ -316,6 +318,20 @@ static void SetIcon(void) free(mask); } +static void SetWindowTitle(void) +{ + char *title; + + title = M_StringReplace(PACKAGE_NAME " Setup ver " PACKAGE_VERSION, + "Doom", + GetGameTitle()); + + + TXT_SetDesktopTitle(title); + + Z_Free(title); +} + // Initialize the textscreen library. static void InitTextscreen(void) @@ -328,8 +344,8 @@ static void InitTextscreen(void) exit(-1); } - TXT_SetDesktopTitle(PACKAGE_NAME " Setup ver " PACKAGE_VERSION); SetIcon(); + SetWindowTitle(); } // Restart the textscreen library. Used when the video_driver variable @@ -354,6 +370,7 @@ static void RunGUI(void) static void MissionSet(void) { + SetWindowTitle(); InitConfig(); MainMenu(); } -- cgit v1.2.3