I am unable to correctly use my microsoft ps/2 intellismouse with the SDL
framebuffer target. It sees the mouse, but I only get garbage movement,
mostly towards the upper-right corner, and a lot of right clicks. GPM
and X both work fine with their IMPS/2 respective drivers.
Looking briefly at SDL_fbevents.c’s FB_OpenMouse() function, if you’ve not
got a /dev/psaux node (which will be checked explicitly to see if it’s an
IMPS/2 protocol device), then SDL will fallback to trying /dev/mouse, and
assume that it’s a Microsoft serial mouse if it suceeds in opening it.
Which means if you’re system looks like most, that is:
$ ls -l /dev/psaux /dev/mouse
lrwxrwxrwx 1 root root 15 May 18 22:58 /dev/mouse -> /dev/psaux
crw-rw-rw- 1 root sys 10, 1 Apr 12 08:04 /dev/psaux
…then you’d be fine. But if you’ve got this:
$ ls -l /dev/psaux /dev/mouse
crw-rw-rw- 1 root sys 10, 1 Apr 12 08:04 /dev/mouse
(no such file for psaux)
…then SDL will get confused.
I wonder if it would be better to search /dev for a device with major 10,
minor 1 when searching for a PS/2 style mouse. Then again, devfs and
/dev/input/mice are suppose to supercede all this mess.
This might not be your problem at all, but that’s the instant candidate I
see in the source.
As for environment vars, you can specify a mouse device (export
SDL_MOUSEDEV=/dev/psaux) and the IMPS/2 protocol (export
SDL_MOUSEDEV_IMPS2=yes)…just not at the same time.
In short, as the source currently stands (I’m looking at 1.2 CVS), I’d say
try:
mknod /dev/psaux c 10 1
export SDL_MOUSEDEV_IMPS2=yes
./my_sdl_app
One of those two would almost HAVE to fix it.
Now I’m all guessed out. Let me know if any of that helped.
–ryan.