(OSX) 10.5 and earlier doesn't have backingScaleFactor, so hardcode it

to 1.0f for those platforms
This commit is contained in:
neville 2015-06-02 09:06:59 +02:00
parent 8151c85980
commit bfb6001114

View File

@ -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();