From 2b3d0467e760de78a236b925bdd45b1c83f270fc Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Tue, 16 Jul 2019 11:37:41 +0300 Subject: [PATCH] - fixed: subtitles background renains visible on new game https://forum.zdoom.org/viewtopic.php?t=65366 # Conflicts: # src/g_statusbar/shared_sbar.cpp --- src/g_statusbar/shared_sbar.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/g_statusbar/shared_sbar.cpp b/src/g_statusbar/shared_sbar.cpp index 0be872941..4f2d6281d 100644 --- a/src/g_statusbar/shared_sbar.cpp +++ b/src/g_statusbar/shared_sbar.cpp @@ -1088,8 +1088,9 @@ void DBaseStatusBar::CallDraw(EHudState state, double ticFrac) void DBaseStatusBar::DrawLog () { int hudwidth, hudheight; + const FString & text = (inter_subtitles && CPlayer->SubtitleCounter) ? CPlayer->SubtitleText : CPlayer->LogText; - if (CPlayer->LogText.IsNotEmpty()) + if (text.IsNotEmpty()) { // This uses the same scaling as regular HUD messages auto scale = active_con_scaletext(); @@ -1097,7 +1098,6 @@ void DBaseStatusBar::DrawLog () hudheight = SCREENHEIGHT / scale; int linelen = hudwidth<640? Scale(hudwidth,9,10)-40 : 560; - const FString & text = (inter_subtitles && CPlayer->SubtitleCounter) ? CPlayer->SubtitleText : CPlayer->LogText; auto lines = V_BreakLines (SmallFont, linelen, text[0] == '$'? GStrings(text.GetChars()+1) : text.GetChars()); int height = 20;