mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
Add a cvar to block use of x11 vidmode
Or really, allow it if the user specifically requests it: the default is blocked. Modern systems (particularly displays) do not really like changing resolution, so doing so by default seems rather wrong.
This commit is contained in:
parent
2771e9c573
commit
d5cb432911
1 changed files with 9 additions and 0 deletions
|
@ -125,6 +125,8 @@ static int accel_threshold;
|
|||
static Atom x_net_state;
|
||||
static Atom x_net_fullscreen;
|
||||
|
||||
static cvar_t *x11_vidmode;
|
||||
|
||||
static void
|
||||
set_fullscreen (int full)
|
||||
{
|
||||
|
@ -387,6 +389,10 @@ X11_SetVidMode (int width, int height)
|
|||
if (vidmode_active)
|
||||
return;
|
||||
|
||||
if (!x11_vidmode->int_val) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (str && (tolower (*str) == 'f')) {
|
||||
Cvar_Set (vid_fullscreen, "1");
|
||||
}
|
||||
|
@ -506,6 +512,9 @@ X11_Init_Cvars (void)
|
|||
"Toggles fullscreen game mode");
|
||||
vid_system_gamma = Cvar_Get ("vid_system_gamma", "1", CVAR_ARCHIVE, NULL,
|
||||
"Use system gamma control if available");
|
||||
x11_vidmode = Cvar_Get ("x11_vidmode", "0", CVAR_ROM, 0,
|
||||
"Use x11 vidmode extension to set video mode "
|
||||
"(not recommended for modern systems)");
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in a new issue