Use CGWarpMouseCursorPosition

This commit is contained in:
paradust7 2022-06-06 03:05:07 +00:00 committed by sfan5
parent 426730bf91
commit 392df9bae3

@ -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);
}