The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
[SDL2]-"SDL_SetRelativeMouseMode"-How To Get X/Y V
JeZ-l-Lee


Joined: 20 Sep 2009
Posts: 572
Location: Long Island, New York, United States, Earth
[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...
[SDL2]-"SDL_SetRelativeMouseMode"-How To Get X/Y V
Jonas Kulla
Guest

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(), 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:
Quote:
[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


_______________________________________________
SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

JeZ-l-Lee


Joined: 20 Sep 2009
Posts: 572
Location: Long Island, New York, United States, Earth
Hi,

Thank you for your help.
Will implement when I wake up.
Been up all night working on this already...