application ? I looked through the SDL sources and found
XGrabPointer call only in DGA mode. I see a nice thing will
be to grab mouse in window while a game is started and
release it when a game is finished or paused.
the right way for a Heretic II alike game? (I mean, if I want to hide
the mouse cursor and use relative mouse coords) And if I am not in
fullscreen mode, will I have to warp the mouse or is this done by SDL.
If I have to warp the mouse, how can I tell whether I have to or not (I
don’t have to with DGA mouse in Fullscreen).
My problem at the moment is that the above combo still shows the mouse
cursor in the middle of the screen…
(if anyone is interested and willing to help me with UT & SDL, he/she
should check out the sdlUT module I finally imported [ https://sourceforge.net/project/?group_id=975 ])–
Daniel Vogel My opinions may have changed,
666 @ http://grafzahl.de but not the fact that I am right
(I mean, if I want to hide
the mouse cursor and use relative mouse coords) And if I am not in
fullscreen mode, will I have to warp the mouse or is this done by SDL.
If I have to warp the mouse, how can I tell whether I have to or not (I
don’t have to with DGA mouse in Fullscreen).
Always warp the mouse. If you are in DGA mouse mode, it is almost zero
overhead, and if you are not, then you will need to warp the mouse to get
any sort of usable interface.
My problem at the moment is that the above combo still shows the mouse
cursor in the middle of the screen…
Can you write a small test program that reproduces this sequence?
Make sure you are also using the very latest SDL 1.1 snapshot.
Always warp the mouse. If you are in DGA mouse mode, it is almost zero
overhead, and if you are not, then you will need to warp the mouse to get
any sort of usable interface.
So I assume the relative movement the warping creates are somehow
filtered by SDL, right?
Can you write a small test program that reproduces this sequence?
Make sure you are also using the very latest SDL 1.1 snapshot.
I will try to write a test program that reproduces the error tomorrow.–
Daniel Vogel My opinions may have changed,
666 @ http://grafzahl.de but not the fact that I am right
Always warp the mouse. If you are in DGA mouse mode, it is almost zero
overhead, and if you are not, then you will need to warp the mouse to get
any sort of usable interface.
So I assume the relative movement the warping creates are somehow
filtered by SDL, right?
No, check the SDL doom source code for the correct way of warping the
mouse. Essentially you ignore mouse motion with the absolute coordinates
of the location you warped to.
I will try to write a test program that reproduces the error tomorrow.
So I assume the relative movement the warping creates are somehow
filtered by SDL, right?
No, check the SDL doom source code for the correct way of warping the
mouse. Essentially you ignore mouse motion with the absolute coordinates
of the location you warped to.
okay, thanks. I didn’t get it working though, but I will figure it out
I will try to write a test program that reproduces the error tomorrow.
Great.
Hmm, strange, a simple test program worked so I assured that I call
everything in the right order (added printfs) and it still shows the
cursor… This leads me to another question: Why do I have to link my
little test app with -lSDL -lpthread -lGL myself???–
Daniel Vogel My opinions may have changed,
666 @ http://grafzahl.de but not the fact that I am right
-------------- next part -------------- #include <SDL/SDL.h>
Hmm, strange, a simple test program worked so I assured that I call
everything in the right order (added printfs) and it still shows the
cursor…
Ahhhh… I think this is a bug in the X server.
Which video card and server do you have?
This leads me to another question: Why do I have to link my
little test app with -lSDL -lpthread -lGL myself???
Because pthread doesn’t work properly unless you link it with the main
executable, and GL programs don’t pick up the GL symbols if the library
is linked into SDL.
-Sam Lantinga (slouken at devolution.com)
Lead Programmer, Loki Entertainment Software–
“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec
Ahhhh… I think this is a bug in the X server.
Which video card and server do you have?
Riva TNT running 3.3.5
btw, if I run in windowed mode the cursor is hidden. ALT-ENTER should
switch to fullscreen mode, right? (it doesn’t work for me)
This leads me to another question: Why do I have to link my
little test app with -lSDL -lpthread -lGL myself???
Because pthread doesn’t work properly unless you link it with the main
executable, and GL programs don’t pick up the GL symbols if the library
is linked into SDL.
ah, thanks–
Daniel Vogel My opinions may have changed,
666 @ http://grafzahl.de but not the fact that I am right