mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-06-02 01:21:17 +00:00
System gamma is now restored properly in X11.
This commit is contained in:
parent
45e98d80d9
commit
c877ba7fbd
1 changed files with 7 additions and 5 deletions
|
@ -99,7 +99,7 @@ Time x_time;
|
||||||
static XF86VidModeModeInfo **vidmodes;
|
static XF86VidModeModeInfo **vidmodes;
|
||||||
static int nummodes;
|
static int nummodes;
|
||||||
static int original_mode = 0;
|
static int original_mode = 0;
|
||||||
static double x_gamma;
|
static double x_gamma = -1;
|
||||||
static qboolean vidmode_avail = false;
|
static qboolean vidmode_avail = false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -387,7 +387,8 @@ X11_SetVidMode (int width, int height)
|
||||||
vidmode_avail = VID_CheckVMode (x_disp, NULL, NULL);
|
vidmode_avail = VID_CheckVMode (x_disp, NULL, NULL);
|
||||||
|
|
||||||
if (vidmode_avail) {
|
if (vidmode_avail) {
|
||||||
vid_gamma_avail = ((x_gamma = X11_GetGamma ()) > 0);
|
if (x_gamma > 0 || (x_gamma = X11_GetGamma ()))
|
||||||
|
vid_gamma_avail = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (vid_fullscreen->int_val && vidmode_avail) {
|
if (vid_fullscreen->int_val && vidmode_avail) {
|
||||||
|
@ -445,7 +446,7 @@ void X11_UpdateFullscreen (cvar_t *fullscreen)
|
||||||
window_saved = 0;
|
window_saved = 0;
|
||||||
}
|
}
|
||||||
if (in_grab) {
|
if (in_grab) {
|
||||||
IN_UpdateGrab(in_grab);
|
IN_UpdateGrab (in_grab);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
|
@ -454,16 +455,17 @@ void X11_UpdateFullscreen (cvar_t *fullscreen)
|
||||||
}
|
}
|
||||||
if (X11_GetWindowCoords (&window_x, &window_y))
|
if (X11_GetWindowCoords (&window_x, &window_y))
|
||||||
window_saved = 1;
|
window_saved = 1;
|
||||||
|
|
||||||
X11_SetVidMode (scr_width, scr_height);
|
X11_SetVidMode (scr_width, scr_height);
|
||||||
if (!vidmode_active) {
|
if (!vidmode_active) {
|
||||||
if (in_grab) {
|
if (in_grab) {
|
||||||
IN_UpdateGrab(in_grab);
|
IN_UpdateGrab (in_grab);
|
||||||
}
|
}
|
||||||
window_saved = 0;
|
window_saved = 0;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (in_grab) {
|
if (in_grab) {
|
||||||
IN_UpdateGrab(in_grab);
|
IN_UpdateGrab (in_grab);
|
||||||
}
|
}
|
||||||
X11_ForceMove(0, 0);
|
X11_ForceMove(0, 0);
|
||||||
XWarpPointer(x_disp,None,x_win,0,0,0,0,vid.width/2,vid.height/2);
|
XWarpPointer(x_disp,None,x_win,0,0,0,0,vid.width/2,vid.height/2);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue