Advertisement

[SDL] [Solved] How take the coordinates of window

Started by September 01, 2011 08:40 PM
1 comment, last by glauberdmo 13 years, 3 months ago
SDL:
I want lock the mouse on window. I guess that is a solution, get the window coordinates and use MouseWarp function. Just I don't know how take these variables.
But if someone know another idea, explain :D
You can use SDL_WM_GrabInput to lock the mouse pointer inside the windowSDL_WM_GrabInput(SDL_GRAB_ON);

Just make sure that there is a way for the user to exit the program other than generating a SDL_QUIT event. Otherwise the user will be trapped because they can't press the X button or any key combination to escape the program. Well at least that's how it works for me on Linux. I guess Windows could be different.
Advertisement
Thx, it works. Tagged as solved

This topic is closed to new replies.

Advertisement