From 0484365de62783a2a09504c104c4cebd5abf6909 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 3 Oct 2018 21:50:39 +0530 Subject: [PATCH] More fixes for compiling on mojave --- glfw/nsgl_context.m | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/glfw/nsgl_context.m b/glfw/nsgl_context.m index 82af90636..2c7211f7a 100644 --- a/glfw/nsgl_context.m +++ b/glfw/nsgl_context.m @@ -27,6 +27,11 @@ #include "internal.h" +#if (MAC_OS_X_VERSION_MAX_ALLOWED < 101400) + #define NSOpenGLContextParameterSwapInterval NSOpenGLCPSwapInterval + #define NSOpenGLContextParameterSurfaceOpacity NSOpenGLCPSurfaceOpacity +#endif + static void makeContextCurrentNSGL(_GLFWwindow* window) { if (window) @@ -49,7 +54,7 @@ static void swapIntervalNSGL(int interval) GLint sync = interval; [window->context.nsgl.object setValues:&sync - forParameter:NSOpenGLCPSwapInterval]; + forParameter:NSOpenGLContextParameterSwapInterval]; } static int extensionSupportedNSGL(const char* extension) @@ -299,7 +304,7 @@ GLFWbool _glfwCreateContextNSGL(_GLFWwindow* window, if (fbconfig->transparent) { GLint opaque = 0; - [window->context.nsgl.object setValues:&opaque forParameter:NSOpenGLCPSurfaceOpacity]; + [window->context.nsgl.object setValues:&opaque forParameter:NSOpenGLContextParameterSurfaceOpacity]; } [window->context.nsgl.object setView:window->ns.view]; @@ -332,4 +337,3 @@ GLFWAPI id glfwGetNSGLContext(GLFWwindow* handle) return window->context.nsgl.object; } -