diff options
author | Simon Howard | 2013-09-20 23:50:44 +0000 |
---|---|---|
committer | Simon Howard | 2013-09-20 23:50:44 +0000 |
commit | 5af0b0450d5e7ae30ec6cef585f1f5c4ef4dddce (patch) | |
tree | ac7c18a973944e298611b8ba3a9321812fe6c7a3 /src/setup | |
parent | f1d79f495d4ad394c87d7fc11132c120736658fa (diff) | |
download | chocolate-doom-5af0b0450d5e7ae30ec6cef585f1f5c4ef4dddce.tar.gz chocolate-doom-5af0b0450d5e7ae30ec6cef585f1f5c4ef4dddce.tar.bz2 chocolate-doom-5af0b0450d5e7ae30ec6cef585f1f5c4ef4dddce.zip |
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
Diffstat (limited to 'src/setup')
-rw-r--r-- | src/setup/mainmenu.c | 19 | ||||
-rw-r--r-- | src/setup/mode.c | 7 | ||||
-rw-r--r-- | src/setup/mode.h | 1 |
3 files changed, 26 insertions, 1 deletions
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(); } diff --git a/src/setup/mode.c b/src/setup/mode.c index 88924ad8..f5387750 100644 --- a/src/setup/mode.c +++ b/src/setup/mode.c @@ -112,6 +112,7 @@ static int screenblocks = 9; static int detailLevel = 0; static char *savedir = NULL; static char *executable = NULL; +static char *game_title = "Doom"; static char *back_flat = "F_PAVE01"; static int comport = 0; static char *nickname = NULL; @@ -223,6 +224,7 @@ static void SetMission(mission_config_t *config) iwads = D_FindAllIWADs(config->mask); gamemission = config->mission; SetExecutable(config); + game_title = config->label; M_SetConfigFilenames(config->config_file, config->extra_config_file); } @@ -374,6 +376,11 @@ char *GetExecutableName(void) return executable; } +char *GetGameTitle(void) +{ + return game_title; +} + iwad_t **GetIwads(void) { return iwads; diff --git a/src/setup/mode.h b/src/setup/mode.h index 44046c38..2495775d 100644 --- a/src/setup/mode.h +++ b/src/setup/mode.h @@ -31,6 +31,7 @@ extern GameMission_t gamemission; void SetupMission(GameSelectCallback callback); void InitBindings(void); char *GetExecutableName(void); +char *GetGameTitle(void); iwad_t **GetIwads(void); #endif /* #ifndef SETUP_MODE_H */ |