Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualAstado89

Posted 25 March 2013 - 08:32 AM

Ok now I got it fixed!

 

after glutwarppointer is called the mouse is suppressed for a short amount of time.

This also occurred using the CGWarpMouseCursorPosition function.

 

So these are not to be used in a game.

 

Instead use

CGEventRef event = CGEventCreateMouseEvent(Nil, kCGEventMouseMoved, CGPointMake(windowwidth/2, windowheight/2), 
                   kCGMouseButtonLeft);
CGEventPost(kCGHIDEventTap, event);

 

This moves the mouse to the middle without creating any interference.


#1Astado89

Posted 25 March 2013 - 08:29 AM

Ok now I got it fixed!

 

after glutwarppointer is called the mouse is suppressed for a short amount of time.

This also occurred using the CGWarpMouseCursorPosition function.

 

So these are not to be used in a game.

 

Instead use

CGEventRef event = CGEventCreateMouseEvent(Nil, kCGEventMouseMoved, CGPointMake(windowwidth/2, windowheight/2), 
                   kCGMouseButtonLeft);
                CGEventPost(kCGHIDEventTap, event);

 

This moves the mouse to the middle without creating any interference.


PARTNERS