Account for property graphicsPort of NSGraphicsContext being deprecated in 10.14

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13121 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Manolo Gouy 2018-11-10 09:00:45 +00:00
parent 43b511b784
commit d312284099

View File

@ -3433,7 +3433,8 @@ void Fl_Cocoa_Window_Driver::make_current()
#endif
{
NSGraphicsContext *nsgc = through_Fl_X_flush ? [NSGraphicsContext currentContext] : [NSGraphicsContext graphicsContextWithWindow:fl_window];
gc = (CGContextRef)[nsgc graphicsPort];
static SEL gc_sel = fl_mac_os_version >= 101000 ? @selector(CGContext) : @selector(graphicsPort);
gc = (CGContextRef)[nsgc performSelector:gc_sel];
}
Fl_Graphics_Driver::default_driver().gc(gc);
CGContextSaveGState(gc); // native context