Fullscreen Mouse

Hi all! I’ve played around a little with SDL in fullscreen mode
(under Linux/X11, so it’s DGA “underneath” it). When using mouse
input, it seems to be limited to a rectangle the size of the
screen. This is fine if you want to use the mouse to control an
object (such as a pointer) directly, but what if you want to do mouse
control a la Quake? Then what you need is to learn about mouse events
in terms of their delta coordinates, not absolute screen coords.

I know DirectInput on Win32 can deliver this kind of “raw” mouse
data; I’ve heard that DGA can, too. Is it supported in SDL? If not,
how about it, Sam?

/Emil

I know DirectInput on Win32 can deliver this kind of “raw” mouse
data; I’ve heard that DGA can, too. Is it supported in SDL? If not,
how about it, Sam?

It’s not currently supported, but I don’t see why not.

How do you translate from X11 “cooked” coordinates to raw coordinates?

DOOM uses a really bad hack:

If mouse moved
Calculate mouse offset
Warp mouse back to center
Report mouse offset

This is high overhead, and every mouse warp generates a mouse motion event.

See ya!
-Sam Lantinga (slouken at devolution.com)–
Author of Simple DirectMedia Layer -
http://www.devolution.com/~slouken/SDL/

I know DirectInput on Win32 can deliver this kind of “raw” mouse
data; I’ve heard that DGA can, too. Is it supported in SDL? If not,
how about it, Sam?

It’s not currently supported, but I don’t see why not.

How do you translate from X11 “cooked” coordinates to raw coordinates?

I don’t know, sorry. Does X11 always report only cooked coords? I’ve
heard that the mouse works fine in the X11/DGA version of UAE (the
Amiga emulator), “fine” meaning better than DOOM.

DOOM uses a really bad hack:

If mouse moved
Calculate mouse offset
Warp mouse back to center
Report mouse offset

Yeah, I know. Horrible.

/EmilOn Fri, 4 Sep 1998, Sam Lantinga wrote:

I don’t know, sorry. Does X11 always report only cooked coords?

I believe that it does, when not in DGA mode.

I’ve heard that the mouse works fine in the X11/DGA version of UAE (the
Amiga emulator), “fine” meaning better than DOOM.

Yup, under DGA you get raw mouse motion.

See ya!
-Sam Lantinga (slouken at devolution.com)–
Author of Simple DirectMedia Layer -
http://www.devolution.com/~slouken/SDL/