diff --git a/source/core/gamecontrol.cpp b/source/core/gamecontrol.cpp index 2f20a54e8..05f8e1303 100644 --- a/source/core/gamecontrol.cpp +++ b/source/core/gamecontrol.cpp @@ -491,6 +491,7 @@ void I_StartupJoysticks(); void I_ShutdownInput(); int RunGame(); void System_MenuClosed(); +void System_MenuDim(); int GameMain() { @@ -510,7 +511,7 @@ int GameMain() nullptr, System_GetSceneRect, nullptr, - nullptr, + System_MenuDim, nullptr, System_DispatchEvent, validFilter, diff --git a/source/core/menu/razemenu.cpp b/source/core/menu/razemenu.cpp index 18dc8d8a2..6f01f0a06 100644 --- a/source/core/menu/razemenu.cpp +++ b/source/core/menu/razemenu.cpp @@ -186,35 +186,19 @@ void System_MenuClosed() gi->MenuClosed(); } - //========================================================================== // -// M_Dim // -// Applies a colored overlay to the entire screen, with the opacity -// determined by the dimamount cvar. // //========================================================================== -CUSTOM_CVAR(Float, dimamount, -1.f, CVAR_ARCHIVE) +void System_MenuDim() { - if (self < 0.f && self != -1.f) + if (gamestate != GS_MENUSCREEN) // With GS_MENUSCREEN we can assume that the background has been tuned for proper menu display already. { - self = -1.f; - } - else if (self > 1.f) - { - self = 1.f; + Dim(twod, 0, 0.5f, 0, 0, screen->GetWidth(), screen->GetHeight()); } } -CVAR(Color, dimcolor, 0xffd700, CVAR_ARCHIVE) - -//============================================================================= -// -// -// -//============================================================================= - //============================================================================= //