Use software gamma for OSX, fix #134

Hardware gamma is broken, especially in fullscreen, and a Mac user told me
that setting HW/screen gamma on OSX is a bad idea anyway, because it resets
the monitor calibration.
The game /should/ look ok with vid_gamma 1 (if your display is configured
properly), but if you think it's too dark set it a bit higher and do
vid_restart.
This commit is contained in:
Daniel Gibson 2016-05-28 16:02:49 +02:00
parent 1894165737
commit da6ad6953d
2 changed files with 6 additions and 2 deletions

View file

@ -442,7 +442,10 @@ static void InitGamma()
XRRFreeScreenResources(res);
VID_Printf(PRINT_ALL, "Using hardware gamma via X11/xRandR.\n");
#elif __APPLE__
gl_state.hwgamma = false;
VID_Printf(PRINT_ALL, "Using software gamma (needs vid_restart after changes)\n");
return;
#else
VID_Printf(PRINT_ALL, "Using hardware gamma via SDL.\n");
#endif

View file

@ -1332,7 +1332,8 @@ void
R_InitImages(void)
{
int i, j;
float g = vid_gamma->value;
// use 1/gamma so higher value is brighter, to match HW gamma settings
float g = 1.0f/vid_gamma->value;
registration_sequence = 1;