Fixed splitview example on Retina displays.

This commit is contained in:
Camilla Berglund 2015-07-21 21:58:24 +02:00
parent 02d821c0ab
commit 460e5d792d

View File

@ -383,6 +383,17 @@ static void windowRefreshFun(GLFWwindow* window)
static void cursorPosFun(GLFWwindow* window, double x, double y)
{
int wnd_width, wnd_height, fb_width, fb_height;
double scale;
glfwGetWindowSize(window, &wnd_width, &wnd_height);
glfwGetFramebufferSize(window, &fb_width, &fb_height);
scale = (double) fb_width / (double) wnd_width;
x *= scale;
y *= scale;
// Depending on which view was selected, rotate around different axes
switch (active_view)
{