From f394f1bc1e34ece5f1e73be4f6c50eb3e262e343 Mon Sep 17 00:00:00 2001 From: terminx Date: Fri, 9 Jun 2017 06:41:39 +0000 Subject: [PATCH] Fix window title in EDUKE32_STANDALONE builds. DONT_BUILD. git-svn-id: https://svn.eduke32.com/eduke32@6169 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/duke3d/src/game.cpp | 4 ++++ source/duke3d/src/premap.cpp | 14 +++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/source/duke3d/src/game.cpp b/source/duke3d/src/game.cpp index 1d61e2585..1a3caa01a 100644 --- a/source/duke3d/src/game.cpp +++ b/source/duke3d/src/game.cpp @@ -5442,7 +5442,11 @@ void G_UpdateAppTitle(void) { if (g_gameNamePtr) { +#ifdef EDUKE32_STANDALONE + Bstrcpy(tempbuf, g_gameNamePtr); +#else Bsprintf(tempbuf, "%s - " APPNAME, g_gameNamePtr); +#endif wm_setapptitle(tempbuf); } else diff --git a/source/duke3d/src/premap.cpp b/source/duke3d/src/premap.cpp index 6c69e9379..4c88907ef 100644 --- a/source/duke3d/src/premap.cpp +++ b/source/duke3d/src/premap.cpp @@ -1849,15 +1849,24 @@ int G_EnterLevel(int gameMode) if (G_HaveUserMap()) { Bstrcpy(levelName, boardfilename); + if (g_gameNamePtr) - Bsprintf(apptitle,"%s - %s - " APPNAME,levelName,g_gameNamePtr); +#ifdef EDUKE32_STANDALONE + Bsprintf(apptitle,"%s - %s",levelName,g_gameNamePtr); +#else + Bsprintf(apptitle, "%s - %s - " APPNAME, levelName, g_gameNamePtr); +#endif else Bsprintf(apptitle,"%s - " APPNAME,levelName); } else { if (g_gameNamePtr) - Bsprintf(apptitle,"%s - %s - " APPNAME,g_mapInfo[mii].name,g_gameNamePtr); +#ifdef EDUKE32_STANDALONE + Bsprintf(apptitle,"%s - %s",g_mapInfo[mii].name,g_gameNamePtr); +#else + Bsprintf(apptitle, "%s - %s - " APPNAME, g_mapInfo[mii].name, g_gameNamePtr); +#endif else Bsprintf(apptitle,"%s - " APPNAME,g_mapInfo[mii].name); } @@ -1865,7 +1874,6 @@ int G_EnterLevel(int gameMode) Bstrcpy(tempbuf,apptitle); wm_setapptitle(tempbuf); - /***** Load the map *****/ DukePlayer_t *const pPlayer = g_player[0].ps; if (!VOLUMEONE && G_HaveUserMap())