aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorparadust7 <102263465+paradust7@users.noreply.github.com>2022-06-06 03:05:07 +0000
committersfan5 <sfan5@live.de>2022-06-06 12:03:16 +0200
commit392df9bae3de8a71bf1d119a58dc2d9f1388751d (patch)
tree995f19456bc9966efa957c43adce584acc25e01f
parent426730bf9196f92bcb5f317abb8d082e3a6bbba3 (diff)
downloadirrlicht-392df9bae3de8a71bf1d119a58dc2d9f1388751d.tar.xz
Use CGWarpMouseCursorPosition
-rw-r--r--source/Irrlicht/CIrrDeviceOSX.mm5
1 files changed, 2 insertions, 3 deletions
diff --git a/source/Irrlicht/CIrrDeviceOSX.mm b/source/Irrlicht/CIrrDeviceOSX.mm
index eb3f816..16236e0 100644
--- a/source/Irrlicht/CIrrDeviceOSX.mm
+++ b/source/Irrlicht/CIrrDeviceOSX.mm
@@ -1172,9 +1172,8 @@ void CIrrDeviceMacOSX::setMouseLocation(int x,int y)
c.x = p.x;
c.y = p.y;
- CGEventRef ev = CGEventCreateMouseEvent(NULL, kCGEventMouseMoved, c, kCGMouseButtonLeft);
- CGEventPost(kCGHIDEventTap, ev);
- CFRelease(ev);
+ CGWarpMouseCursorPosition(c);
+ CGAssociateMouseAndMouseCursorPosition(YES);
}