mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-02-21 03:11:57 +00:00
Merge pull request #955 from devnexen/fix_windows_hidden
introduces a new cl_unpaused_scvis cvar to unpause the cli.
This commit is contained in:
commit
fac2313774
4 changed files with 13 additions and 0 deletions
|
@ -133,6 +133,9 @@ Set `0` by default.
|
|||
loading. If set to `0` pause mode is never entered, this is the
|
||||
Vanilla Quake II behaviour.
|
||||
|
||||
* **cl_unpaused_scvis**: If set to `1` (the default) the client unpause
|
||||
when the screen becomes visible.
|
||||
|
||||
* **cl_r1q2_lightstyle**: Since the first release Yamagi Quake II used
|
||||
the R1Q2 colors for the dynamic lights of rockets. Set to `0` to get
|
||||
the Vanilla Quake II colors. Defaults to `1`.
|
||||
|
|
|
@ -57,6 +57,7 @@ cvar_t *cl_showclamp;
|
|||
cvar_t *cl_paused;
|
||||
cvar_t *cl_loadpaused;
|
||||
cvar_t *cl_audiopaused;
|
||||
cvar_t *cl_unpaused_scvis;
|
||||
|
||||
cvar_t *cl_lightlevel;
|
||||
cvar_t *cl_r1q2_lightstyle;
|
||||
|
@ -518,6 +519,7 @@ CL_InitLocal(void)
|
|||
cl_paused = Cvar_Get("paused", "0", 0);
|
||||
cl_loadpaused = Cvar_Get("cl_loadpaused", "1", CVAR_ARCHIVE);
|
||||
cl_audiopaused = Cvar_Get("cl_audiopaused", "1", CVAR_ARCHIVE);
|
||||
cl_unpaused_scvis = Cvar_Get("cl_unpaused_scvis", "1", CVAR_ARCHIVE);
|
||||
|
||||
gl1_stereo = Cvar_Get( "gl1_stereo", "0", CVAR_ARCHIVE );
|
||||
gl1_stereo_separation = Cvar_Get( "gl1_stereo_separation", "1", CVAR_ARCHIVE );
|
||||
|
|
|
@ -306,6 +306,7 @@ extern cvar_t *cl_lightlevel;
|
|||
extern cvar_t *cl_paused;
|
||||
extern cvar_t *cl_loadpaused;
|
||||
extern cvar_t *cl_audiopaused;
|
||||
extern cvar_t *cl_unpaused_scvis;
|
||||
extern cvar_t *cl_timedemo;
|
||||
extern cvar_t *cl_vwep;
|
||||
extern cvar_t *horplus;
|
||||
|
|
|
@ -681,6 +681,13 @@ IN_Update(void)
|
|||
// be on another display now!
|
||||
glimp_refreshRate = -1;
|
||||
}
|
||||
else if (event.window.event == SDL_WINDOWEVENT_SHOWN)
|
||||
{
|
||||
if (cl_unpaused_scvis->value > 0)
|
||||
{
|
||||
Cvar_SetValue("paused", 0);
|
||||
}
|
||||
}
|
||||
else if (event.window.event == SDL_WINDOWEVENT_MINIMIZED ||
|
||||
event.window.event == SDL_WINDOWEVENT_HIDDEN)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue