summaryrefslogtreecommitdiff
path: root/macosx
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2014-02-19 14:47:26 +0100
committerKonstantin Käfer <mail@kkaefer.com>2014-02-19 14:47:26 +0100
commitdcb6c2b7877e8a1c723c85947e86ee37c4c6baa5 (patch)
treeb7f8227cb115fef69bf327c96334ec7d40200bdf /macosx
parent504b60b93e622c982a2103757754614bf67b851e (diff)
downloadqtlocation-mapboxgl-dcb6c2b7877e8a1c723c85947e86ee37c4c6baa5.tar.gz
calculate the proper pixelRatio
Diffstat (limited to 'macosx')
-rw-r--r--macosx/main.mm8
1 files changed, 7 insertions, 1 deletions
diff --git a/macosx/main.mm b/macosx/main.mm
index c9d3045c3a..ff8e91e338 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);