diff options
| author | Juan Linietsky | 2014-02-13 18:06:53 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2014-02-13 18:06:53 -0300 |
| commit | b607687a3182ef2fa9955d71abe86b31bdc1f99f (patch) | |
| tree | 388b6fa3c4ee2a38114208d8f8faab751ae23361 /platform/osx | |
| parent | 58cda02a389759d18176216c06f375d364cefef1 (diff) | |
| parent | 4ff524b5c9227d0eeae2a8d9761add7465c03710 (diff) | |
| download | godot-b607687a3182ef2fa9955d71abe86b31bdc1f99f.tar.gz godot-b607687a3182ef2fa9955d71abe86b31bdc1f99f.tar.zst godot-b607687a3182ef2fa9955d71abe86b31bdc1f99f.zip | |
Merge branch 'master' of https://github.com/okamstudio/godot
Diffstat (limited to 'platform/osx')
| -rw-r--r-- | platform/osx/os_osx.mm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm index 5be46e484..c692a296e 100644 --- a/platform/osx/os_osx.mm +++ b/platform/osx/os_osx.mm @@ -378,8 +378,8 @@ static int button_mask=0; prev_mouse_y=mouse_y; const NSRect contentRect = [OS_OSX::singleton->window_view frame]; const NSPoint p = [event locationInWindow]; - mouse_x = p.x; - mouse_y = contentRect.size.height - p.y; + mouse_x = p.x * [[event window] backingScaleFactor]; + mouse_y = (contentRect.size.height - p.y) * [[event window] backingScaleFactor]; ev.mouse_motion.x=mouse_x; ev.mouse_motion.y=mouse_y; ev.mouse_motion.global_x=mouse_x; |
