# Gamma issue on Mac

**URL:** <https://discourse.ioquake.org/t/gamma-issue-on-mac/634>\
**Category:** support\
**Created:** [February 6, 2016, 12:51pm UTC](https://discourse.ioquake.org/t/gamma-issue-on-mac/634 "2016-02-06T12:51:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nima](https://avatars.discourse-cdn.com/v4/letter/n/9dc877/32.png) [@nima](https://discourse.ioquake.org/u/nima)\
**Post date:** [February 6, 2016, 12:51pm UTC](https://discourse.ioquake.org/t/gamma-issue-on-mac/634/1 "2016-02-06T12:51:12Z")

</div>

Hello,

I installed the latest build on my retina Macbook Pro (OS X 10.11.3) and am having an issue with gamma in fullscreen mode. About 2 seconds after the game starts or after a vid\_restart, the gamma settings appear to change and the game becomes darker. If I set r\_gamma to a different value and then back to my preferred value things go back to normal again. (Also, as I’ve verified with a custom build, calling GLimp\_SetGamma with the current s\_gammatable corrects the situation as well.) My q3config.cfg has the following lines.

seta r\_mode "-1"  
seta r\_fullscreen "1"  
seta r\_customwidth "1280"  
seta r\_customheight “800”

If I happen to set my resolution to 1280x800 LOWDPI before running ioquake3 (which is only possible using a 3rd party app like QuickRes) then the problem does not occur.

The problem persists if I delete q3config.cfg.

The problem does not occur with the opengl2 renderer.

Please let me know if I should provide more details. I’m set up to build the source so I can test code changes if need be.

Cheers,  
-Nima

---

<div class="post-metadata">

**Author:** ![nima](https://avatars.discourse-cdn.com/v4/letter/n/9dc877/32.png) [@nima](https://discourse.ioquake.org/u/nima)\
**Post date:** [February 7, 2016, 4:45pm UTC](https://discourse.ioquake.org/t/gamma-issue-on-mac/634/2 "2016-02-07T16:45:00Z")

</div>

Hello again,

I’ve been working on this issue since yesterday. I updated the SDL library to the latest release (2.0.4) and this didn’t resolve the problem. I’ve also verified (using SDL\_GetWindowGammaRamp() and some debug output) that the gamma table for the display is actually _not_ changing between the time it is set to the correct values in GLimp\_SetGamma (via SDL\_SetWindowGammaRamp() called after /vid\_restart) to when the game becomes dark. Nevertheless, reseting the gamma table to the correct values using SDL\_SetWindowGammaRamp() (with the same values spit out by SDL\_GetWindowGammaRamp()) corrects the brightness. It’s quite puzzling.

Cheers,  
-Nima
