summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2019-10-26 08:47:25 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2019-10-26 08:47:25 +0200
commitd1e346a7d2f4345f6387dc42e73d6ec2da7c2e60 (patch)
tree4b0af1d0dfd00ea232a5bf00f3894c7225306e78 /src
parent4f8e692f30807aeea3284bfccc929823281ce899 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/Fl_cocoa.mm4
1 files changed, 2 insertions, 2 deletions
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];
}