Instead of displaying "Unknown GRP - EDuke32", simply display "EDuke32".

Much classier this way.

git-svn-id: https://svn.eduke32.com/eduke32@4516 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2014-06-16 23:17:11 +00:00
parent fd78e9f954
commit f4becd06d5
4 changed files with 31 additions and 13 deletions

View file

@ -10373,6 +10373,19 @@ static void G_CheckCommandLine(int32_t argc, const char **argv)
} }
} }
void G_UpdateAppTitle(void)
{
if (g_gameNamePtr)
{
Bsprintf(tempbuf, "%s - " APPNAME, g_gameNamePtr);
wm_setapptitle(tempbuf);
}
else
{
wm_setapptitle(APPNAME);
}
}
static void G_DisplayLogo(void) static void G_DisplayLogo(void)
{ {
int32_t soundanm = 0; int32_t soundanm = 0;
@ -10389,8 +10402,7 @@ static void G_DisplayLogo(void)
flushperms(); flushperms();
nextpage(); nextpage();
Bsprintf(tempbuf, "%s - " APPNAME, g_gameNamePtr); G_UpdateAppTitle();
wm_setapptitle(tempbuf);
S_StopMusic(); S_StopMusic();
FX_StopAllSounds(); // JBF 20031228 FX_StopAllSounds(); // JBF 20031228
@ -11034,8 +11046,7 @@ void G_BackToMenu(void)
g_player[myconnectindex].ps->gm = MODE_MENU; g_player[myconnectindex].ps->gm = MODE_MENU;
M_ChangeMenu(MENU_MAIN); M_ChangeMenu(MENU_MAIN);
KB_FlushKeyboardQueue(); KB_FlushKeyboardQueue();
Bsprintf(tempbuf, "%s - " APPNAME, g_gameNamePtr); G_UpdateAppTitle();
wm_setapptitle(tempbuf);
} }
static int32_t G_EndOfLevel(void) static int32_t G_EndOfLevel(void)
@ -11470,7 +11481,7 @@ int32_t app_main(int32_t argc, const char **argv)
g_gameType = first->game; g_gameType = first->game;
g_gameNamePtr = listgrps->name; g_gameNamePtr = listgrps->name;
} }
else if (!fg) g_gameNamePtr = "Unknown GRP"; else if (!fg) g_gameNamePtr = NULL;
} }
#ifdef STARTUP_SETUP_WINDOW #ifdef STARTUP_SETUP_WINDOW
@ -11608,8 +11619,7 @@ int32_t app_main(int32_t argc, const char **argv)
// gotta set the proper title after we compile the CONs if this is the full version // gotta set the proper title after we compile the CONs if this is the full version
Bsprintf(tempbuf, "%s - " APPNAME, g_gameNamePtr); G_UpdateAppTitle();
wm_setapptitle(tempbuf);
if (g_scriptDebug) if (g_scriptDebug)
initprintf("CON debugging activated (level %d).\n",g_scriptDebug); initprintf("CON debugging activated (level %d).\n",g_scriptDebug);
@ -12655,8 +12665,7 @@ void G_BonusScreen(int32_t bonusonly)
if (g_networkMode == NET_DEDICATED_SERVER) if (g_networkMode == NET_DEDICATED_SERVER)
return; return;
Bsprintf(tempbuf, "%s - " APPNAME, g_gameNamePtr); G_UpdateAppTitle();
wm_setapptitle(tempbuf);
if (ud.volume_number == 0 && ud.last_level == 8 && boardfilename[0]) if (ud.volume_number == 0 && ud.last_level == 8 && boardfilename[0])
{ {

View file

@ -372,6 +372,7 @@ void G_GameQuit(void);
void G_GetCrosshairColor(void); void G_GetCrosshairColor(void);
void G_HandleLocalKeys(void); void G_HandleLocalKeys(void);
void G_HandleSpecialKeys(void); void G_HandleSpecialKeys(void);
void G_UpdateAppTitle(void);
void G_PrintGameQuotes(int32_t snum); void G_PrintGameQuotes(int32_t snum);
//void G_SE40(int32_t smoothratio); //void G_SE40(int32_t smoothratio);
void G_SetCrosshairColor(int32_t r,int32_t g,int32_t b); void G_SetCrosshairColor(int32_t r,int32_t g,int32_t b);

View file

@ -5543,8 +5543,7 @@ repeatcase:
} }
gamename[i] = '\0'; gamename[i] = '\0';
g_gameNamePtr = Xstrdup(gamename); g_gameNamePtr = Xstrdup(gamename);
Bsprintf(tempbuf,"%s - " APPNAME,g_gameNamePtr); G_UpdateAppTitle();
wm_setapptitle(tempbuf);
} }
continue; continue;

View file

@ -1865,9 +1865,18 @@ int32_t G_EnterLevel(int32_t g)
if (G_HaveUserMap()) if (G_HaveUserMap())
{ {
Bstrcpy(levname, boardfilename); Bstrcpy(levname, boardfilename);
if (g_gameNamePtr)
Bsprintf(apptitle,"%s - %s - " APPNAME,levname,g_gameNamePtr); Bsprintf(apptitle,"%s - %s - " APPNAME,levname,g_gameNamePtr);
else
Bsprintf(apptitle,"%s - " APPNAME,levname);
}
else
{
if (g_gameNamePtr)
Bsprintf(apptitle,"%s - %s - " APPNAME,MapInfo[mii].name,g_gameNamePtr);
else
Bsprintf(apptitle,"%s - " APPNAME,MapInfo[mii].name);
} }
else Bsprintf(apptitle,"%s - %s - " APPNAME,MapInfo[mii].name,g_gameNamePtr);
Bstrcpy(tempbuf,apptitle); Bstrcpy(tempbuf,apptitle);
wm_setapptitle(tempbuf); wm_setapptitle(tempbuf);