diff options
| author | Manolo Gouy <Manolo> | 2018-11-10 09:00:45 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2018-11-10 09:00:45 +0000 |
| commit | d312284099ea1ddae761359c00e76813812662d2 (patch) | |
| tree | 4d867fb2384d7e35075949c1b93a1c50642ddb1c /src | |
| parent | 43b511b784e4350562d0639dfd7a078d761ec54d (diff) | |
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
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_cocoa.mm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index c6dad6b31..ace5519f5 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -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 |
