diff options
author | Yevgeny Makarov <jenkm> | 2020-12-13 23:48:50 +0300 |
---|---|---|
committer | Harley Acheson <harley.acheson@gmail.com> | 2020-12-13 23:48:50 +0300 |
commit | afeaac8b18b2f0d5db0aadae6009cf1d16218c65 (patch) | |
tree | 1a6d83f523b29ba4ac18e0b172270d58e9dc68af /source/blender/windowmanager/intern/wm_stereo.c | |
parent | 2e5d9a73f7b957114972185e996c0e36aadd4652 (diff) |
Fix cursor position on HighDPI in stereo side-by-side mode
Could not select left quarter of the screen in stereo side-by-side mode on high dpi displays.
Differential Revision: https://developer.blender.org/D9836
Reviewed by Julian Eisel
Diffstat (limited to 'source/blender/windowmanager/intern/wm_stereo.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_stereo.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/windowmanager/intern/wm_stereo.c b/source/blender/windowmanager/intern/wm_stereo.c index fb9c71163c8..a620accab72 100644 --- a/source/blender/windowmanager/intern/wm_stereo.c +++ b/source/blender/windowmanager/intern/wm_stereo.c @@ -188,7 +188,7 @@ void wm_stereo3d_mouse_offset_apply(wmWindow *win, int *r_mouse_xy) } if (win->stereo3d_format->display_mode == S3D_DISPLAY_SIDEBYSIDE) { - const int half_x = win->sizex / 2; + const int half_x = WM_window_pixels_x(win) / 2; /* right half of the screen */ if (r_mouse_xy[0] > half_x) { r_mouse_xy[0] -= half_x; @@ -196,7 +196,7 @@ void wm_stereo3d_mouse_offset_apply(wmWindow *win, int *r_mouse_xy) r_mouse_xy[0] *= 2; } else if (win->stereo3d_format->display_mode == S3D_DISPLAY_TOPBOTTOM) { - const int half_y = win->sizey / 2; + const int half_y = WM_window_pixels_y(win) / 2; /* upper half of the screen */ if (r_mouse_xy[1] > half_y) { r_mouse_xy[1] -= half_y; |