forked from Mirrorlandia_minetest/irrlicht
Use CGWarpMouseCursorPosition
This commit is contained in:
parent
426730bf91
commit
392df9bae3
@ -1172,9 +1172,8 @@ void CIrrDeviceMacOSX::setMouseLocation(int x,int y)
|
|||||||
c.x = p.x;
|
c.x = p.x;
|
||||||
c.y = p.y;
|
c.y = p.y;
|
||||||
|
|
||||||
CGEventRef ev = CGEventCreateMouseEvent(NULL, kCGEventMouseMoved, c, kCGMouseButtonLeft);
|
CGWarpMouseCursorPosition(c);
|
||||||
CGEventPost(kCGHIDEventTap, ev);
|
CGAssociateMouseAndMouseCursorPosition(YES);
|
||||||
CFRelease(ev);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user