Added preprocessor macros for AppKit framework versions

These macros are needed to build with earlier OS X SDKs
This commit is contained in:
alexey.lysiuk 2015-12-27 11:10:00 +02:00
parent 7fa289109b
commit 6f3e04785d
2 changed files with 11 additions and 8 deletions

View File

@ -50,12 +50,18 @@ struct RenderBufferOptions
extern RenderBufferOptions rbOpts; extern RenderBufferOptions rbOpts;
// Version of AppKit framework we are interested in
// The following values are needed to build with earlier SDKs
#define AppKit10_4 824
#define AppKit10_5 949
#define AppKit10_6 1038
#define AppKit10_7 1138
inline bool I_IsHiDPISupported() inline bool I_IsHiDPISupported()
{ {
// The following value shoud be equal to NSAppKitVersionNumber10_7 return NSAppKitVersionNumber >= AppKit10_7;
// and it's hard-coded in order to build on earlier SDKs
return NSAppKitVersionNumber >= 1138;
} }
void I_ProcessEvent(NSEvent* event); void I_ProcessEvent(NSEvent* event);

View File

@ -561,10 +561,7 @@ void CocoaVideo::SetWindowVisible(bool visible)
static bool HasModernFullscreenAPI() static bool HasModernFullscreenAPI()
{ {
// The following value shoud be equal to NSAppKitVersionNumber10_6 return NSAppKitVersionNumber >= AppKit10_6;
// and it's hard-coded in order to build on earlier SDKs
return NSAppKitVersionNumber >= 1038;
} }
void CocoaVideo::SetStyleMask(const NSUInteger styleMask) void CocoaVideo::SetStyleMask(const NSUInteger styleMask)