diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2024-05-02 11:12:36 +0200 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2024-05-02 11:12:36 +0200 |
| commit | 24c1472c063aafcd1151f574ca75415f671d9100 (patch) | |
| tree | e76e880d725a31eca7db7af5f7c2ffd7edb7868d | |
| parent | f194d8596f4a9761fa180ae5cc49b0f9d421bfb5 (diff) | |
macOS + GL: remove compilation error with old SDK versions
| -rw-r--r-- | src/drivers/Cocoa/Fl_Cocoa_Gl_Window_Driver.mm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/drivers/Cocoa/Fl_Cocoa_Gl_Window_Driver.mm b/src/drivers/Cocoa/Fl_Cocoa_Gl_Window_Driver.mm index 43a1c1b9e..d52cae3ca 100644 --- a/src/drivers/Cocoa/Fl_Cocoa_Gl_Window_Driver.mm +++ b/src/drivers/Cocoa/Fl_Cocoa_Gl_Window_Driver.mm @@ -165,7 +165,7 @@ Fl_Gl_Choice *Fl_Cocoa_Gl_Window_Driver::find(int m, const int *alistp) } -#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_VERSION_12_0 +#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_12 # define NSOpenGLContextParameterSurfaceOpacity NSOpenGLCPSurfaceOpacity #endif @@ -270,7 +270,7 @@ void Fl_Cocoa_Gl_Window_Driver::after_show() { [shared_gl1_ctxt retain]; } [view addSubview:gl1view]; - #if MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_7 + #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7 if (fl_mac_os_version >= 100700 && Fl::use_high_res_GL()) { [gl1view setWantsBestResolutionOpenGLSurface:YES]; } @@ -355,6 +355,10 @@ void Fl_Cocoa_Gl_Window_Driver::swap_buffers() { char Fl_Cocoa_Gl_Window_Driver::swap_type() {return copy;} +#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_12 +# define NSOpenGLContextParameterSwapInterval NSOpenGLCPSwapInterval +#endif + void Fl_Cocoa_Gl_Window_Driver::swap_interval(int n) { GLint interval = (GLint)n; NSOpenGLContext* ctx = (NSOpenGLContext*)pWindow->context(); |
