Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 e60e9cb
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/video/quartz/SDL_QuartzVideo.m
Expand Up @@ -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];
Expand All @@ -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];
Expand All @@ -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.