After spending hours trying to figure out why my mouselook function didn’t work with SDL, I finally got a solution.
The problem was that I didn’t use SDL_PumpEvents() before calling SDL_GetMouseState(). But if I do that I get the next problem: my Keyboard Events get delayed because the event-queue got enormous.
In the end I decided to put the mouse motion handling in where I handled the SDL-events. That worked. I’ll post some code very soon, so if somebody has a similar problem, he/she doesn’t need to spend hours on it, as I did.
This post was imported from tumblr