From 73ddbc3acdd2c7765d4ae953dd9b31da93acf433 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Sun, 9 Oct 2016 12:37:01 +0200 Subject: [PATCH] Cocoa: Add workaround for hasty deprecation --- src/cocoa_window.m | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/cocoa_window.m b/src/cocoa_window.m index ddd3edad..cad8715d 100644 --- a/src/cocoa_window.m +++ b/src/cocoa_window.m @@ -32,6 +32,23 @@ // Needed for _NSGetProgname #include +// HACK: The 10.12 SDK adds new symbols and immediately deprecates the old ones +#if MAC_OS_X_VERSION_MAX_ALLOWED < 101200 + #define NSWindowStyleMaskBorderless NSBorderlessWindowMask + #define NSWindowStyleMaskClosable NSClosableWindowMask + #define NSWindowStyleMaskMiniaturizable NSMiniaturizableWindowMask + #define NSWindowStyleMaskResizable NSResizableWindowMask + #define NSWindowStyleMaskTitled NSTitledWindowMask + #define NSEventModifierFlagCommand NSCommandKeyMask + #define NSEventModifierFlagControl NSControlKeyMask + #define NSEventModifierFlagOption NSAlternateKeyMask + #define NSEventModifierFlagShift NSShiftKeyMask + #define NSEventModifierFlagDeviceIndependentFlagsMask NSDeviceIndependentModifierFlagsMask + #define NSEventMaskAny NSAnyEventMask + #define NSEventTypeApplicationDefined NSApplicationDefined + #define NSEventTypeKeyUp NSKeyUp +#endif + // Returns the specified standard cursor //