From db380b53db90d5982cb3e060b4f069090f6b557a Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Sun, 7 Feb 2021 14:15:51 +1100 Subject: [PATCH] try to fix cocoa build not compiling against 10.5 SDK --- src/interop_cocoa.m | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/interop_cocoa.m b/src/interop_cocoa.m index f05c0f2b3..aaf043dd3 100644 --- a/src/interop_cocoa.m +++ b/src/interop_cocoa.m @@ -189,11 +189,13 @@ void Window_Show(void) { RefreshWindowBounds(); // TODO: even necessary? } +/* NOTE: Only defined since macOS 10.7 SDK */ +#define _NSFullScreenWindowMask (1 << 14) int Window_GetWindowState(void) { int flags; flags = [winHandle styleMask]; - if (flags & NSFullScreenWindowMask) return WINDOW_STATE_FULLSCREEN; + if (flags & _NSFullScreenWindowMask) return WINDOW_STATE_FULLSCREEN; flags = [winHandle isMiniaturized]; return flags ? WINDOW_STATE_MINIMISED : WINDOW_STATE_NORMAL; @@ -481,5 +483,5 @@ cc_bool GLContext_SwapBuffers(void) { void GLContext_SetFpsLimit(cc_bool vsync, float minFrameMs) { int value = vsync ? 1 : 0; - [ctxHandle setValues:&value forParameter: NSOpenGLContextParameterSwapInterval]; + [ctxHandle setValues:&value forParameter: NSOpenGLCPSwapInterval]; }