From d1e346a7d2f4345f6387dc42e73d6ec2da7c2e60 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Sat, 26 Oct 2019 08:47:25 +0200 Subject: Restore support of OpenGL on retina without Fl::use_high_res_GL(1) Apparently the default value of the wantsBestResolutionOpenGLSurface property changed with macOS Catalina 10.15 --- src/Fl_cocoa.mm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index ffabb6e41..9a66a3479 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -2857,11 +2857,11 @@ NSOpenGLContext* Fl_Cocoa_Window_Driver::create_GLcontext_for_window(NSOpenGLPix NSOpenGLContext *context = [[NSOpenGLContext alloc] initWithFormat:pixelformat shareContext:shared_ctx]; if (context) { FLView *view = (FLView*)[fl_xid(window) contentView]; - if (fl_mac_os_version >= 100700 && Fl::use_high_res_GL()) { + if (fl_mac_os_version >= 100700) { //replaces [view setWantsBestResolutionOpenGLSurface:YES] without compiler warning typedef void (*bestResolutionIMP)(id, SEL, BOOL); static bestResolutionIMP addr = (bestResolutionIMP)[NSView instanceMethodForSelector:@selector(setWantsBestResolutionOpenGLSurface:)]; - addr(view, @selector(setWantsBestResolutionOpenGLSurface:), YES); + addr(view, @selector(setWantsBestResolutionOpenGLSurface:), Fl::use_high_res_GL() != 0); } [context setView:view]; } -- cgit v1.2.3