Skip to content
Permalink
Browse files

Disable SDL_[GS]etGammaRamp() on Mac OS X.

They apparently crash the Intel HD 4000 drivers on Mac OS X 10.9, don't work
 in other places, and are using deprecated APIs in any case.

(Blah blah blah, move to SDL 2.0, blah blah blah.)
  • Loading branch information
icculus committed Dec 1, 2013
1 parent e1383f5 commit e60e9cb5ef32534f91a381b2428358db9f15910e
Showing with 10 additions and 0 deletions.
  1. +10 −0 src/video/quartz/SDL_QuartzVideo.m
@@ -1635,6 +1635,10 @@ int QZ_GetGamma (_THIS, float *red, float *green, float *blue)

int QZ_SetGammaRamp (_THIS, Uint16 *ramp)
{
/* These no longer work on Mac OS X, and crash on some drivers (Intel HD
4000 on Mac OS X 10.9, for example). */
return -1;
#if 0
const uint32_t tableSize = 256;
CGGammaValue redTable[tableSize];
CGGammaValue greenTable[tableSize];
@@ -1657,10 +1661,15 @@ int QZ_SetGammaRamp (_THIS, Uint16 *ramp)
return 0;
else
return -1;
#endif
}

int QZ_GetGammaRamp (_THIS, Uint16 *ramp)
{
/* These no longer work on Mac OS X, and crash on some drivers (Intel HD
4000 on Mac OS X 10.9, for example). */
return -1;
#if 0
const uint32_t tableSize = 256;
CGGammaValue redTable[tableSize];
CGGammaValue greenTable[tableSize];
@@ -1685,5 +1694,6 @@ int QZ_GetGammaRamp (_THIS, Uint16 *ramp)
ramp[i] = blueTable[i % tableSize] * 65535.0;

return 0;
#endif
}

0 comments on commit e60e9cb

Please sign in to comment.