From 6f3e04785d9fe8dd68d7d6c2b6d1494aa67046c9 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sun, 27 Dec 2015 11:10:00 +0200 Subject: [PATCH] Added preprocessor macros for AppKit framework versions These macros are needed to build with earlier OS X SDKs --- src/posix/cocoa/i_common.h | 14 ++++++++++---- src/posix/cocoa/i_video.mm | 5 +---- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/posix/cocoa/i_common.h b/src/posix/cocoa/i_common.h index 545540b2f..dc1e12121 100644 --- a/src/posix/cocoa/i_common.h +++ b/src/posix/cocoa/i_common.h @@ -50,12 +50,18 @@ struct RenderBufferOptions 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() { - // The following value shoud be equal to NSAppKitVersionNumber10_7 - // and it's hard-coded in order to build on earlier SDKs - - return NSAppKitVersionNumber >= 1138; + return NSAppKitVersionNumber >= AppKit10_7; } void I_ProcessEvent(NSEvent* event); diff --git a/src/posix/cocoa/i_video.mm b/src/posix/cocoa/i_video.mm index 3fc2b2aed..a47a1f1a8 100644 --- a/src/posix/cocoa/i_video.mm +++ b/src/posix/cocoa/i_video.mm @@ -561,10 +561,7 @@ void CocoaVideo::SetWindowVisible(bool visible) static bool HasModernFullscreenAPI() { - // The following value shoud be equal to NSAppKitVersionNumber10_6 - // and it's hard-coded in order to build on earlier SDKs - - return NSAppKitVersionNumber >= 1038; + return NSAppKitVersionNumber >= AppKit10_6; } void CocoaVideo::SetStyleMask(const NSUInteger styleMask)