From 25af31528c17f4c349950fc27638dcb2412c5f96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Wed, 6 Nov 2019 17:25:16 +0100 Subject: [PATCH] Cocoa: Add comments for Cocoa symbol macros (cherry picked from commit 94cb0347abdc4e8ebf8dcf133894a764d395b84c) --- src/cocoa_platform.h | 3 +++ src/nsgl_context.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/cocoa_platform.h b/src/cocoa_platform.h index 43639a34..b29b64c8 100644 --- a/src/cocoa_platform.h +++ b/src/cocoa_platform.h @@ -41,6 +41,9 @@ typedef void* id; #endif +// NOTE: Many Cocoa enum values have been renamed and we need to build across +// SDK versions where one is unavailable or the other deprecated +// We use the newer names in code and these macros to handle compatibility #if MAC_OS_X_VERSION_MAX_ALLOWED < 101200 #define NSBitmapFormatAlphaNonpremultiplied NSAlphaNonpremultipliedBitmapFormat #define NSEventMaskAny NSAnyEventMask diff --git a/src/nsgl_context.h b/src/nsgl_context.h index 2485b180..432d200e 100644 --- a/src/nsgl_context.h +++ b/src/nsgl_context.h @@ -24,6 +24,9 @@ // //======================================================================== +// NOTE: Many Cocoa enum values have been renamed and we need to build across +// SDK versions where one is unavailable or the other deprecated +// We use the newer names in code and these macros to handle compatibility #if MAC_OS_X_VERSION_MAX_ALLOWED < 101400 #define NSOpenGLContextParameterSwapInterval NSOpenGLCPSwapInterval #define NSOpenGLContextParameterSurfaceOpacity NSOpenGLCPSurfaceOpacity