FLTK logo

[master] 24c1472 - macOS + GL: remove compilation error with old SDK versions

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.commit  ]
 
Previous Message ]Next Message ]

[master] 24c1472 - macOS + GL: remove compilation error with old SDK versions "ManoloFLTK" 02:17 May 02  
 
commit 24c1472c063aafcd1151f574ca75415f671d9100
Author:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
AuthorDate: Thu May 2 11:12:36 2024 +0200
Commit:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
CommitDate: Thu May 2 11:12:36 2024 +0200

    macOS + GL: remove compilation error with old SDK versions

 src/drivers/Cocoa/Fl_Cocoa_Gl_Window_Driver.mm | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git src/drivers/Cocoa/Fl_Cocoa_Gl_Window_Driver.mm src/drivers/Cocoa/Fl_Cocoa_Gl_Window_Driver.mm
index 43a1c1b..d52cae3 100644
--- src/drivers/Cocoa/Fl_Cocoa_Gl_Window_Driver.mm
+++ 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();
Direct Link to Message ]
 
     
Previous Message ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.