From bfb6001114fa6145da3be25ae1124595b7f5f5f9 Mon Sep 17 00:00:00 2001 From: neville Date: Tue, 2 Jun 2015 09:06:59 +0200 Subject: [PATCH] (OSX) 10.5 and earlier doesn't have backingScaleFactor, so hardcode it to 1.0f for those platforms --- gfx/drivers_context/cocoa_gl_ctx.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gfx/drivers_context/cocoa_gl_ctx.m b/gfx/drivers_context/cocoa_gl_ctx.m index 3574fdeea5..03951889df 100644 --- a/gfx/drivers_context/cocoa_gl_ctx.m +++ b/gfx/drivers_context/cocoa_gl_ctx.m @@ -376,7 +376,11 @@ static bool cocoagl_gfx_ctx_get_metrics(void *data, enum display_metric_types ty float display_height = display_pixel_size.height; float physical_width = display_physical_size.width; float physical_height = display_physical_size.height; +#if MAC_OS_X_VERSION_10_6 float scale = screen.backingScaleFactor; +#else + float scale = 1.0f; +#endif float dpi = (display_width/ physical_width) * 25.4f * scale; #elif defined(HAVE_COCOATOUCH) float scale = cocoagl_gfx_ctx_get_native_scale();