[SDL] Adding SpaceNavigator support to libSDL (on Windows)

Ettore Pasquini ettore_pasquini at 3dconnexion.com
Wed May 14 17:03:36 PDT 2008


I made a patch to support the SpaceNavigator and other DirectInput-only
joysticks on Windows.  See attachement or here:

http://cubelogic.org/dev/libsdl/20080514/3Dconnexion-win-SDL1.3.patch

Some background notes on my work: I assumed the MultiMedia driver was the
one currently in use for Windows, as the DirectInput solution
(win32/SDL_dxjoystick.c) seems to be excluded by default.  However, the
SpaceNavigator and other Space* devices are not recognized by the MultiMedia
driver, so I had to use DirectInput in some way.  What I did is (1) respect
the current choice of using MM, and (2) merge in some DirectInput code when
needed, i.e. To support "special" DirectInput-only joysticks.  DirectInput
is *only* used with joysticks listed in the SYS_SpecialJoysticks array to
avoid duplicates between MM and DI.  The DirectInput code is vastly taken
from SDL_dxjoystick.c with as few changes as possible.

Let me know if you see any problems, I'll be happy to fix them.

Ettore


-- 
http://www.3dconnexion.com/


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 3Dconnexion-win-SDL1.3.patch
Type: application/octet-stream
Size: 29301 bytes
Desc: not available
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20080514/85510655/attachment-0001.obj>


More information about the SDL mailing list