Disable SDL_[GS]etGammaRamp() on Mac OS X. SDL-1.2
authorRyan C. Gordon <icculus@icculus.org>
Sun, 01 Dec 2013 00:00:17 -0500
branchSDL-1.2
changeset 8040 22a7f096bb9d
parent 7991 cfec3f86fba7
child 8716 0aade9c0203f
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.)
src/video/quartz/SDL_QuartzVideo.m
--- a/src/video/quartz/SDL_QuartzVideo.m	Fri Nov 15 22:33:55 2013 -0500
+++ b/src/video/quartz/SDL_QuartzVideo.m	Sun Dec 01 00:00:17 2013 -0500
@@ -1635,6 +1635,10 @@
 
 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 @@
         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 @@
         ramp[i] = blueTable[i % tableSize] * 65535.0;
 
     return 0;
+#endif
 }