(svn r11653) -Feature: [OSX] Allow windowed mode subdrivers to be disabled at compile time.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user