[SDL2]-"SDL_SetRelativeMouseMode"-How To Get X/Y Values?

[SDL2]-“SDL_SetRelativeMouseMode”-How To Get X/Y Values?

Hi,

I am having difficulty in learning “SDL_SetRelativeMouseMode”.
I know how to set the above, but how do I get mouse motion X/Y values?
I want to move a space ship with the mouse when “SDL_SetRelativeMouseMode” is enabled.
Any help would be appreciated, thank you…------------------------
JeZ+Lee
JessePalser <AT> Gmail <DOT> com
16BitSoft Inc.
Video Game Design Studio
www.16BitSoft.com

https://wiki.libsdl.org/SDL_MouseMotionEvent

Quoting the wiki:
“Relative motion is stored in xrel and yrel and is relative to the last
motion event.
If relative mouse mode is enabled with SDL_SetRelativeMouseMode
https://wiki.libsdl.org/SDL_SetRelativeMouseMode(), then the
mouse will give relative motion events even when the cursor reaches the edge
of the screen.”

2014-12-12 14:37 GMT+01:00 JeZ-l-Lee :>

[SDL2]-“SDL_SetRelativeMouseMode”-How To Get X/Y Values?

Hi,

I am having difficulty in learning “SDL_SetRelativeMouseMode”.
I know how to set the above, but how do I get mouse motion X/Y values?
I want to move a space ship with the mouse when "SDL_SetRelativeMouseMode"
is enabled.
Any help would be appreciated, thank you…


JeZ+Lee
JessePalser Gmail com
16BitSoft Inc.
Video Game Design Studio
www.16BitSoft.com


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Hi,

Thank you for your help.
Will implement when I wake up.
Been up all night working on this already…------------------------
JeZ+Lee
JessePalser <AT> Gmail <DOT> com
16BitSoft Inc.
Video Game Design Studio
www.16BitSoft.com