From dfe79c3fcdc0076758c5093bbb77a9d66c8ba687 Mon Sep 17 00:00:00 2001 From: Twinaphex Date: Sat, 16 Jan 2016 12:09:50 +0100 Subject: [PATCH] setWantsBestResolutionOpenGLSurface - determine at runtime if we can call this instead of compile-time --- gfx/drivers_context/cocoa_gl_ctx.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gfx/drivers_context/cocoa_gl_ctx.m b/gfx/drivers_context/cocoa_gl_ctx.m index 1ca81d3890..2330b83fea 100644 --- a/gfx/drivers_context/cocoa_gl_ctx.m +++ b/gfx/drivers_context/cocoa_gl_ctx.m @@ -199,9 +199,9 @@ static void *cocoagl_gfx_ctx_init(void *video_driver) #if defined(HAVE_COCOA) CocoaView *g_view = (CocoaView*)nsview_get_ptr(); -#if MAC_OS_X_VERSION_10_7 - [g_view setWantsBestResolutionOpenGLSurface:YES]; -#endif + if ([g_view respondsToSelector: @selector(setWantsBestResolutionOpenGLSurface:)]) + [g_view setWantsBestResolutionOpenGLSurface:YES]; + NSOpenGLPixelFormatAttribute attributes [] = { NSOpenGLPFAColorSize, 24, NSOpenGLPFADoubleBuffer,