mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
vid_fullscreen toggling thanks to james411
This commit is contained in:
parent
a344c9fbd2
commit
749270a52a
2 changed files with 21 additions and 1 deletions
|
@ -319,10 +319,23 @@ X11_SetVidMode (int width, int height)
|
|||
#endif
|
||||
}
|
||||
|
||||
void X11_UpdateFullscreen (cvar_t *v_fs)
|
||||
{
|
||||
if (!vid_context_created) {
|
||||
return;
|
||||
}
|
||||
if (v_fs->int_val==0) {
|
||||
X11_RestoreVidMode();
|
||||
} else {
|
||||
X11_SetVidMode(scr_width,scr_height);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
X11_Init_Cvars (void)
|
||||
{
|
||||
vid_fullscreen = Cvar_Get ("vid_fullscreen", "0", CVAR_ROM, NULL,
|
||||
vid_fullscreen = Cvar_Get ("vid_fullscreen", "0", CVAR_ARCHIVE,
|
||||
&X11_UpdateFullscreen,
|
||||
"Toggles fullscreen game mode");
|
||||
vid_system_gamma = Cvar_Get ("vid_system_gamma", "1", CVAR_ARCHIVE, NULL,
|
||||
"Use system gamma control if available");
|
||||
|
@ -412,6 +425,7 @@ X11_RestoreVidMode (void)
|
|||
X11_SetGamma (x_gamma);
|
||||
XF86VidModeSwitchToMode (x_disp, x_screen, vidmodes[original_mode]);
|
||||
XFree (vidmodes);
|
||||
vidmode_active=false;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -252,6 +252,12 @@ VID_GetGamma (void)
|
|||
return (double) X11_GetGamma ();
|
||||
}
|
||||
|
||||
void
|
||||
VID_ForceViewPort(void)
|
||||
{
|
||||
X11_ForceViewPort ();
|
||||
}
|
||||
|
||||
qboolean
|
||||
VID_SetGamma (double gamma)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue