From 7580d8f608dfcf3a880f69370add737e5c2995b0 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Thu, 9 Aug 2012 15:43:39 -0400 Subject: [PATCH] Fixed building on Mac OS X with Xcode 4.4 (OS X 10.8 SDK). I think you'll need to install Xquartz, the external-but-official replacement for Apple's X11, to get the Xlib headers: http://support.apple.com/kb/HT5293 --- include/SDL_config_macosx.h | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/include/SDL_config_macosx.h b/include/SDL_config_macosx.h index 0b88b5e5e..ed69e1a03 100644 --- a/include/SDL_config_macosx.h +++ b/include/SDL_config_macosx.h @@ -139,17 +139,23 @@ #define SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS "/usr/X11R6/lib/libXss.1.dylib" #define SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE "/usr/X11R6/lib/libXxf86vm.1.dylib" #define SDL_VIDEO_DRIVER_X11_XINERAMA 1 -/* -not included with Mac OS X at the moment... -#define SDL_VIDEO_DRIVER_X11_XINPUT2 1 -#define SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS 1 -*/ #define SDL_VIDEO_DRIVER_X11_XRANDR 1 #define SDL_VIDEO_DRIVER_X11_XSCRNSAVER 1 #define SDL_VIDEO_DRIVER_X11_XSHAPE 1 #define SDL_VIDEO_DRIVER_X11_XVIDMODE 1 #define SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM 1 +#ifdef MAC_OS_X_VERSION_10_8 +/* + * No matter the versions targeted, this is the 10.8 or later SDK, so you have + * to use the external Xquartz, which is a more modern Xlib. Previous SDKs + * used an older Xlib. + */ +#define SDL_VIDEO_DRIVER_X11_XINPUT2 1 +#define SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS 1 +#define SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY 1 +#endif + #ifndef SDL_VIDEO_RENDER_OGL #define SDL_VIDEO_RENDER_OGL 1 #endif