summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2023-02-21 08:48:42 +0100
committerGitHub <noreply@github.com>2023-02-21 08:48:42 +0100
commit6cde3fac328e97e66b1c12d386deb25af395e215 (patch)
tree3c139e72223feca8b057e0e93e72e02c9c6def1f /platform
parentfe08570ac5f4928a0270bdf12377f34942cfb30f (diff)
parent6f418a3441170ec993709800cb58a60da9676f28 (diff)
Merge pull request #73666 from bruvzg/mac_warp
[macOS] Fix Input.warp_mouse shifted by one screen pixel.
Diffstat (limited to 'platform')
-rw-r--r--platform/macos/display_server_macos.mm2
1 files changed, 1 insertions, 1 deletions
diff --git a/platform/macos/display_server_macos.mm b/platform/macos/display_server_macos.mm
index 14778b5f03..e8eb5b419b 100644
--- a/platform/macos/display_server_macos.mm
+++ b/platform/macos/display_server_macos.mm
@@ -2024,7 +2024,7 @@ void DisplayServerMacOS::warp_mouse(const Point2i &p_position) {
// Local point in window coords.
const NSRect contentRect = [wd.window_view frame];
const float scale = screen_get_max_scale();
- NSRect pointInWindowRect = NSMakeRect(p_position.x / scale, contentRect.size.height - (p_position.y / scale - 1), 0, 0);
+ NSRect pointInWindowRect = NSMakeRect(p_position.x / scale, contentRect.size.height - (p_position.y / scale), scale, scale);
NSPoint pointOnScreen = [[wd.window_view window] convertRectToScreen:pointInWindowRect].origin;
// Point in scren coords.