From 53fc458795b35bb8d88adc8d69d0dc19d9083b15 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 2 May 2016 14:53:23 +0200 Subject: [PATCH] (Cocoa) Store idiom type inside unsigned variable --- gfx/drivers_context/cocoa_gl_ctx.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gfx/drivers_context/cocoa_gl_ctx.m b/gfx/drivers_context/cocoa_gl_ctx.m index f1bb434328..8d38890fd2 100644 --- a/gfx/drivers_context/cocoa_gl_ctx.m +++ b/gfx/drivers_context/cocoa_gl_ctx.m @@ -455,8 +455,9 @@ static bool cocoagl_gfx_ctx_get_metrics(void *data, enum display_metric_types ty float physical_width = screen_rect.size.width * scale; float physical_height = screen_rect.size.height * scale; float dpi = 160 * scale; + unsigned idiom_type = UI_USER_INTERFACE_IDIOM(); - switch (UI_USER_INTERFACE_IDIOM()) + switch (idiom_type) { case -1: /* UIUserInterfaceIdiomUnspecified */ /* TODO */