macOS platform + GLUT: fix crash with glut_test app
This commit is contained in:
parent
28c7c584fa
commit
a20bace4e1
@ -187,7 +187,7 @@ static NSOpenGLContext *create_GLcontext_for_window(
|
|||||||
if (shared_ctx && !context) context = [[NSOpenGLContext alloc] initWithFormat:pixelformat shareContext:nil];
|
if (shared_ctx && !context) context = [[NSOpenGLContext alloc] initWithFormat:pixelformat shareContext:nil];
|
||||||
if (context) {
|
if (context) {
|
||||||
NSView *view = [fl_xid(window) contentView];
|
NSView *view = [fl_xid(window) contentView];
|
||||||
if (fl_mac_os_version >= 100700) {
|
if (view && fl_mac_os_version >= 100700) {
|
||||||
//replaces [view setWantsBestResolutionOpenGLSurface:YES] without compiler warning
|
//replaces [view setWantsBestResolutionOpenGLSurface:YES] without compiler warning
|
||||||
typedef void (*bestResolutionIMP)(id, SEL, BOOL);
|
typedef void (*bestResolutionIMP)(id, SEL, BOOL);
|
||||||
static bestResolutionIMP addr = (bestResolutionIMP)[NSView instanceMethodForSelector:@selector(setWantsBestResolutionOpenGLSurface:)];
|
static bestResolutionIMP addr = (bestResolutionIMP)[NSView instanceMethodForSelector:@selector(setWantsBestResolutionOpenGLSurface:)];
|
||||||
|
Loading…
Reference in New Issue
Block a user