Did you watch this demo - "02 - Input"? There are few lines of code in function Timer(at end of it) that very important:The mouse coords initialize to where the mouse was when the game was launched, but never update after.
Code:// EN: Necessarily clear all the states. key_ClearState(); mouse_ClearState(); joy_ClearState();
Bookmarks