From 5fcbb8f59bdc442c09395aee62201ad905cab3b2 Mon Sep 17 00:00:00 2001 From: bjarni Date: Fri, 30 Nov 2007 13:26:24 +0000 Subject: (svn r11540) -Fix: [OSX] Don't try to compile the quartz video driver on OSX 10.3. It will fail --- src/video/cocoa/cocoa_v.h | 7 ++++++- src/video/cocoa/cocoa_v.mm | 2 ++ src/video/cocoa/wnd_quartz.mm | 4 +++- 3 files changed, 11 insertions(+), 2 deletions(-) (limited to 'src/video') diff --git a/src/video/cocoa/cocoa_v.h b/src/video/cocoa/cocoa_v.h index 0fdc48645..2be0100df 100644 --- a/src/video/cocoa/cocoa_v.h +++ b/src/video/cocoa/cocoa_v.h @@ -3,6 +3,8 @@ #ifndef VIDEO_COCOA_H #define VIDEO_COCOA_H +#include + #include "../video_driver.hpp" class VideoDriver_Cocoa: public VideoDriver { @@ -59,9 +61,12 @@ public: extern CocoaSubdriver* _cocoa_subdriver; CocoaSubdriver *QZ_CreateFullscreenSubdriver(int width, int height, int bpp); -CocoaSubdriver *QZ_CreateWindowQuartzSubdriver(int width, int height, int bpp); CocoaSubdriver *QZ_CreateWindowQuickdrawSubdriver(int width, int height, int bpp); +#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4 +CocoaSubdriver *QZ_CreateWindowQuartzSubdriver(int width, int height, int bpp); +#endif + void QZ_GameSizeChanged(); void QZ_GameLoop(); diff --git a/src/video/cocoa/cocoa_v.mm b/src/video/cocoa/cocoa_v.mm index 24a7a4086..d039d30ad 100644 --- a/src/video/cocoa/cocoa_v.mm +++ b/src/video/cocoa/cocoa_v.mm @@ -232,10 +232,12 @@ static CocoaSubdriver *QZ_CreateWindowSubdriver(int width, int height, int bpp) { CocoaSubdriver *ret; +#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4 if (MacOSVersionIsAtLeast(10, 4, 0)) { ret = QZ_CreateWindowQuartzSubdriver(width, height, bpp); if (ret != NULL) return ret; } +#endif ret = QZ_CreateWindowQuickdrawSubdriver(width, height, bpp); if (ret != NULL) return ret; diff --git a/src/video/cocoa/wnd_quartz.mm b/src/video/cocoa/wnd_quartz.mm index 9df8525f3..044f3c67f 100644 --- a/src/video/cocoa/wnd_quartz.mm +++ b/src/video/cocoa/wnd_quartz.mm @@ -8,9 +8,10 @@ #ifdef WITH_COCOA -#define MAC_OS_X_VERSION_MIN_REQUIRED MAC_OS_X_VERSION_10_4 #include +#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4 + #import #import /* gettimeofday */ #import /* for MAXPATHLEN */ @@ -801,4 +802,5 @@ CocoaSubdriver *QZ_CreateWindowQuartzSubdriver(int width, int height, int bpp) return ret; } +#endif /* MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4 */ #endif /* WITH_COCOA */ -- cgit v1.2.3-54-g00ecf