Merge branch 'ttfixes2' into 'next'

Fix title card not showing up at all if focus lost

See merge request STJr/SRB2!736
This commit is contained in:
James R 2020-01-31 02:33:57 -05:00
commit 510ed5353d
3 changed files with 8 additions and 3 deletions

View file

@ -1941,6 +1941,10 @@ boolean G_IsTitleCardAvailable(void)
if (gametyperules & GTR_NOTITLECARD) if (gametyperules & GTR_NOTITLECARD)
return false; return false;
// The current level has no name.
if (!mapheaderinfo[gamemap-1]->lvlttl[0])
return false;
// The title card is available. // The title card is available.
return true; return true;
} }

View file

@ -3684,8 +3684,7 @@ boolean P_LoadLevel(boolean fromnetsave)
return true; return true;
// If so... // If so...
if ((!(mapheaderinfo[gamemap-1]->levelflags & LF_NOTITLECARD)) && (*mapheaderinfo[gamemap-1]->lvlttl != '\0')) G_PreLevelTitleCard();
G_PreLevelTitleCard();
return true; return true;
} }

View file

@ -1278,13 +1278,15 @@ void ST_preDrawTitleCard(void)
// //
void ST_runTitleCard(void) void ST_runTitleCard(void)
{ {
boolean run = !(paused || P_AutoPause());
if (!G_IsTitleCardAvailable()) if (!G_IsTitleCardAvailable())
return; return;
if (lt_ticker >= (lt_endtime + TICRATE)) if (lt_ticker >= (lt_endtime + TICRATE))
return; return;
if (!(paused || P_AutoPause())) if (run || (lt_ticker < PRELEVELTIME))
{ {
// tick // tick
lt_ticker++; lt_ticker++;