From dcb6c2b7877e8a1c723c85947e86ee37c4c6baa5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20Ka=CC=88fer?= Date: Wed, 19 Feb 2014 14:47:26 +0100 Subject: [PATCH] calculate the proper pixelRatio --- macosx/main.mm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/macosx/main.mm b/macosx/main.mm index c9d3045c3..ff8e91e33 100644 --- a/macosx/main.mm +++ b/macosx/main.mm @@ -39,8 +39,14 @@ public: glfwSetWindowUserPointer(window, this); glfwMakeContextCurrent(window); + + int width, height; + glfwGetWindowSize(window, &width, &height); + int fb_width, fb_height; + glfwGetFramebufferSize(window, &fb_width, &fb_height); + settings.load(); - map.setup(); + map.setup((double)fb_width / width); resize(window, 0, 0);