Fixed bug 2085 - SDL 1.2.15 fails to build on OSX 10.9 Mavericks – deprecated CGDirectPaletteRef was removed
Adrian Petrescu
The CGDirectPaletteRef struct no longer exists in 10.9 (it had been previously deprecated) which prevents SDL 1.2.15 from building with the following error:
In file included from ./src/video/quartz/SDL_QuartzEvents.m:24:
./src/video/quartz/SDL_QuartzVideo.h:94:5: error: unknown type name 'CGDirectPaletteRef'
CGDirectPaletteRef palette; /* palette of an 8-bit display */
^
I was able to make everything compile just by removing that item from the struct, nothing else in libsdl seems to depend on it, but I have *no* idea if this is a valid fix, knowing next to nothing about SDL.
--- a/src/video/quartz/SDL_QuartzVideo.h Sat Aug 10 10:54:03 2013 -0700
+++ b/src/video/quartz/SDL_QuartzVideo.h Thu Sep 05 06:38:57 2013 -0700
@@ -91,7 +91,6 @@
CGDirectDisplayID display; /* 0 == main display (only support single display) */
const void *mode; /* current mode of the display */
const void *save_mode; /* original mode of the display */
- CGDirectPaletteRef palette; /* palette of an 8-bit display */
NSOpenGLContext *gl_context; /* OpenGL rendering context */
NSGraphicsContext *nsgfx_context; /* Cocoa graphics context */
Uint32 width, height, bpp; /* frequently used data about the display */