mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-11 07:42:18 +00:00
[x11] Fix a optimization compiler warning
With the old headers removed, X11_SetGamma became a stub and gcc complained about it wanting the const attribute. On investigation, it turned out the X_XF86VidModeSetGamma was a holdover from the initial implementation of hardware gamma support.
This commit is contained in:
parent
af5d92708d
commit
78b4e8217e
1 changed files with 4 additions and 4 deletions
|
@ -609,7 +609,6 @@ qboolean
|
|||
X11_SetGamma (double gamma)
|
||||
{
|
||||
#ifdef HAVE_VIDMODE
|
||||
# ifdef X_XF86VidModeSetGamma
|
||||
XF86VidModeGamma xgamma;
|
||||
|
||||
if (vid_gamma_avail && vid_system_gamma->int_val && x_have_focus) {
|
||||
|
@ -617,7 +616,8 @@ X11_SetGamma (double gamma)
|
|||
if (XF86VidModeSetGamma (x_disp, x_screen, &xgamma))
|
||||
return true;
|
||||
}
|
||||
# endif
|
||||
#else
|
||||
Sys_MaskPrintf (SYS_vid, "X11_SetGamma: cannot adjust gamma\n");
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
@ -626,7 +626,6 @@ void
|
|||
X11_RestoreGamma (void)
|
||||
{
|
||||
#ifdef HAVE_VIDMODE
|
||||
# ifdef X_XF86VidModeSetGamma
|
||||
XF86VidModeGamma xgamma;
|
||||
|
||||
if (vid_gamma_avail && x_gamma[0] > 0) {
|
||||
|
@ -635,7 +634,8 @@ X11_RestoreGamma (void)
|
|||
xgamma.blue = x_gamma[2];
|
||||
XF86VidModeSetGamma (x_disp, x_screen, &xgamma);
|
||||
}
|
||||
# endif
|
||||
#else
|
||||
Sys_MaskPrintf (SYS_vid, "X11_RestoreGamma: cannot adjust gamma\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue