From b1ebb897e88ae262462eb6624b0a93cd40a367ed Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Sun, 22 Mar 2020 20:20:59 +1100 Subject: [PATCH] Repair HUD scaling returning to 100% when relaunching Duke or RR games. - Resolves https://forum.zdoom.org/viewtopic.php?f=340&t=67811 --- source/common/gamecvars.cpp | 2 +- source/duke3d/src/config.cpp | 1 - source/duke3d/src/game.cpp | 1 + source/rr/src/config.cpp | 1 - source/rr/src/game.cpp | 1 + 5 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/common/gamecvars.cpp b/source/common/gamecvars.cpp index e67366b58..1654bff04 100644 --- a/source/common/gamecvars.cpp +++ b/source/common/gamecvars.cpp @@ -179,7 +179,7 @@ CUSTOM_CVARD(Int, hud_scale, 100, CVAR_ARCHIVE | CVAR_NOINITCALL, "changes the h { if (self < 35) self = 35; else if (self > 100) self = 100; - else gi->set_hud_scale(hud_scale); + else gi->set_hud_scale(self); } // This is to allow flattening the overly complicated HUD configuration to one single value and keep the complexity safely inside the HUD code. diff --git a/source/duke3d/src/config.cpp b/source/duke3d/src/config.cpp index c432b6813..12aba63f8 100644 --- a/source/duke3d/src/config.cpp +++ b/source/duke3d/src/config.cpp @@ -54,7 +54,6 @@ int CONFIG_ReadSetup(void) ud.slidebar_paldisabled = 1; ud.statusbarflags = 0;//STATUSBAR_NOSHRINK; ud.statusbarmode = 1; - ud.statusbarscale = 100; ud.god = 0; ud.m_respawn_items = 0; diff --git a/source/duke3d/src/game.cpp b/source/duke3d/src/game.cpp index 8c64ef485..b44aea1b3 100644 --- a/source/duke3d/src/game.cpp +++ b/source/duke3d/src/game.cpp @@ -5650,6 +5650,7 @@ int GameInterface::app_main() CONFIG_ReadSetup(); hud_size.Callback(); + hud_scale.Callback(); S_InitSound(); diff --git a/source/rr/src/config.cpp b/source/rr/src/config.cpp index e4a85a965..7d74fdc1e 100644 --- a/source/rr/src/config.cpp +++ b/source/rr/src/config.cpp @@ -43,7 +43,6 @@ int32_t CONFIG_ReadSetup(void) ud.screen_tilting = 1; ud.statusbarflags = STATUSBAR_NOSHRINK; - ud.statusbarscale = 100; playerteam = 0; ud.angleinterpolation = 0; diff --git a/source/rr/src/game.cpp b/source/rr/src/game.cpp index 790d68c80..2cd6f87d9 100644 --- a/source/rr/src/game.cpp +++ b/source/rr/src/game.cpp @@ -7163,6 +7163,7 @@ int GameInterface::app_main() hud_size.Callback(); + hud_scale.Callback(); S_InitSound();