mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-26 06:20:48 +00:00
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:
parent
1894165737
commit
da6ad6953d
2 changed files with 6 additions and 2 deletions
|
@ -442,7 +442,10 @@ static void InitGamma()
|
||||||
XRRFreeScreenResources(res);
|
XRRFreeScreenResources(res);
|
||||||
|
|
||||||
VID_Printf(PRINT_ALL, "Using hardware gamma via X11/xRandR.\n");
|
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
|
#else
|
||||||
VID_Printf(PRINT_ALL, "Using hardware gamma via SDL.\n");
|
VID_Printf(PRINT_ALL, "Using hardware gamma via SDL.\n");
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1332,7 +1332,8 @@ void
|
||||||
R_InitImages(void)
|
R_InitImages(void)
|
||||||
{
|
{
|
||||||
int i, j;
|
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;
|
registration_sequence = 1;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue