diff options
Diffstat (limited to 'src/video/cocoa/cocoa_v.mm')
-rw-r--r-- | src/video/cocoa/cocoa_v.mm | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/video/cocoa/cocoa_v.mm b/src/video/cocoa/cocoa_v.mm index db8ef2c5b..90434c5d6 100644 --- a/src/video/cocoa/cocoa_v.mm +++ b/src/video/cocoa/cocoa_v.mm @@ -232,6 +232,7 @@ static CocoaSubdriver *QZ_CreateWindowSubdriver(int width, int height, int bpp) { CocoaSubdriver *ret; +#ifdef ENABLE_COCOA_QUARTZ #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4 /* The reason for the version mismatch is due to the fact that the 10.4 binary needs to work on 10.5 as well. */ if (MacOSVersionIsAtLeast(10, 5, 0)) { @@ -239,9 +240,25 @@ static CocoaSubdriver *QZ_CreateWindowSubdriver(int width, int height, int bpp) if (ret != NULL) return ret; } #endif +#endif +#ifdef ENABLE_COCOA_QUICKDRAW ret = QZ_CreateWindowQuickdrawSubdriver(width, height, bpp); if (ret != NULL) return ret; +#endif + +#ifdef ENABLE_COCOA_QUARTZ +#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4 + /* + * If we get here we are running 10.4 or earlier and either openttd was compiled without the quickdraw driver + * or it failed to load for some reason. Fall back to Quartz if possible even though that driver is slower. + */ + if (MacOSVersionIsAtLeast(10, 4, 0)) { + ret = QZ_CreateWindowQuartzSubdriver(width, height, bpp); + if (ret != NULL) return ret; + } +#endif +#endif return NULL; } |