diff options
-rw-r--r-- | source/Irrlicht/CIrrDeviceOSX.mm | 5 |
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); } |