- respect i_pauseinbackground setting

This commit is contained in:
Rachael Alexanderson 2023-01-07 07:18:52 -05:00
parent 165afbbfa9
commit 532a726ae3

View file

@ -98,6 +98,7 @@ CVARD(Bool, hud_textfont, false, CVAR_ARCHIVE, "Use the regular text font as rep
EXTERN_CVAR(Bool, ui_generic) EXTERN_CVAR(Bool, ui_generic)
EXTERN_CVAR(String, language) EXTERN_CVAR(String, language)
EXTERN_CVAR(Bool, i_pauseinbackground)
CUSTOM_CVAR(Int, mouse_capturemode, 1, CVAR_GLOBALCONFIG | CVAR_ARCHIVE) CUSTOM_CVAR(Int, mouse_capturemode, 1, CVAR_GLOBALCONFIG | CVAR_ARCHIVE)
{ {
@ -1187,7 +1188,10 @@ void updatePauseStatus()
// This must go through the network in multiplayer games. // This must go through the network in multiplayer games.
if (M_Active() || System_WantGuiCapture() || !AppActive) if (M_Active() || System_WantGuiCapture() || !AppActive)
{ {
paused = 1; if (i_pauseinbackground)
paused = 1;
else if (!pausedWithKey)
paused = 0;
} }
else if (!M_Active() || !System_WantGuiCapture()) else if (!M_Active() || !System_WantGuiCapture())
{ {