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 56839f428d
3 changed files with 8 additions and 3 deletions

View file

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

View file

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

View file

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