mirror of
https://github.com/glfw/glfw.git
synced 2024-11-25 19:42:00 +00:00
Fixed splitview example on Retina displays.
This commit is contained in:
parent
02d821c0ab
commit
460e5d792d
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user