I'm new to SDL2, so pardon any ignorance, but I am experiencing strange results when using relative mouse mode in SDL2.0.3. When I do SDL_SetRelativeMouseMode(SDL_bool::SDL_true), the cursor is hidden as expected. Inside the event loop, I check for windowEvent.type == SDL_MOUSEMOTION and then use windowEvent.motion.xrel/yrel xrel and yrel report values from -4 to 4 when the mouse is not even moving! Furthermore, actually moving my mouse does not seem to correlate whatsoever to the xrel and yrel's being reported.
Should I be doing this differently?
I have the exact same problem on my computer, but using Uint32 SDL_GetRelativeMouseState(int* x,int* y) instead works fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With