ZakBlystone / metacade

A cross-platform embeddable arcade framework for use in video games
Other
6 stars 2 forks source link

[Request] Mouse-lock on the host application #3

Open OddKell opened 5 years ago

OddKell commented 5 years ago

The metacade tool does not lock the mouse cursor to the center of the window, nor does it hide it. It currently only reads the coordinates of the mouse cursor relative to the window evt.motion.x and evt.motion.y and calculates the movement delta based on previous input states.

It would be beneficial to add mouse-lock on the host application, aswell as modify the exisiting implementation so that instead of calculating the delta based on the previous input state, it would use the SDL provided evt.motion.xrel and evt.motion.yrel which would continue to provide movement values even if the mouse position doesn't change. (For more info, see: SDL_MouseMotionEvent)

(Request added as asked on the pixeltail forums)