mirror of https://github.com/OpenTTD/OpenTTD
(svn r25951) -Fix [FS#5797]: [OSX] Disable the old fullscreen sub-driver when compiling with SDK versions 10.9+.
parent
a298a62098
commit
a41b8c851d
|
@ -396,9 +396,12 @@ static CocoaSubdriver *QZ_CreateSubdriver(int width, int height, int bpp, bool f
|
||||||
if (MacOSVersionIsAtLeast(10, 7, 0)) {
|
if (MacOSVersionIsAtLeast(10, 7, 0)) {
|
||||||
ret = QZ_CreateWindowSubdriver(width, height, bpp);
|
ret = QZ_CreateWindowSubdriver(width, height, bpp);
|
||||||
if (ret != NULL && fullscreen) ret->ToggleFullscreen();
|
if (ret != NULL && fullscreen) ret->ToggleFullscreen();
|
||||||
} else {
|
}
|
||||||
|
#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_9
|
||||||
|
else {
|
||||||
ret = fullscreen ? QZ_CreateFullscreenSubdriver(width, height, bpp) : QZ_CreateWindowSubdriver(width, height, bpp);
|
ret = fullscreen ? QZ_CreateFullscreenSubdriver(width, height, bpp) : QZ_CreateWindowSubdriver(width, height, bpp);
|
||||||
}
|
}
|
||||||
|
#endif /* MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_9 */
|
||||||
|
|
||||||
if (ret != NULL) return ret;
|
if (ret != NULL) return ret;
|
||||||
if (!fallback) return NULL;
|
if (!fallback) return NULL;
|
||||||
|
@ -408,7 +411,7 @@ static CocoaSubdriver *QZ_CreateSubdriver(int width, int height, int bpp, bool f
|
||||||
ret = QZ_CreateWindowSubdriver(640, 480, bpp);
|
ret = QZ_CreateWindowSubdriver(640, 480, bpp);
|
||||||
if (ret != NULL) return ret;
|
if (ret != NULL) return ret;
|
||||||
|
|
||||||
#ifdef _DEBUG
|
#if defined(_DEBUG) && (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_9)
|
||||||
/* This Fullscreen mode crashes on OSX 10.7 */
|
/* This Fullscreen mode crashes on OSX 10.7 */
|
||||||
if (!MacOSVersionIsAtLeast(10, 7, 0)) {
|
if (!MacOSVersionIsAtLeast(10, 7, 0)) {
|
||||||
/* Try fullscreen too when in debug mode */
|
/* Try fullscreen too when in debug mode */
|
||||||
|
@ -416,7 +419,7 @@ static CocoaSubdriver *QZ_CreateSubdriver(int width, int height, int bpp, bool f
|
||||||
ret = QZ_CreateFullscreenSubdriver(640, 480, bpp);
|
ret = QZ_CreateFullscreenSubdriver(640, 480, bpp);
|
||||||
if (ret != NULL) return ret;
|
if (ret != NULL) return ret;
|
||||||
}
|
}
|
||||||
#endif
|
#endif /* defined(_DEBUG) && (MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_9) */
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,8 @@
|
||||||
|
|
||||||
#include "../../stdafx.h"
|
#include "../../stdafx.h"
|
||||||
|
|
||||||
|
#if MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_9
|
||||||
|
|
||||||
#define Rect OTTDRect
|
#define Rect OTTDRect
|
||||||
#define Point OTTDPoint
|
#define Point OTTDPoint
|
||||||
#import <Cocoa/Cocoa.h>
|
#import <Cocoa/Cocoa.h>
|
||||||
|
@ -518,4 +520,5 @@ CocoaSubdriver *QZ_CreateFullscreenSubdriver(int width, int height, int bpp)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif /* MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_9 */
|
||||||
#endif /* WITH_COCOA */
|
#endif /* WITH_COCOA */
|
||||||
|
|
Loading…
Reference in New Issue