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
Adding SpaceNavigator support to libSDL
Ettore Pasquini
Guest

Hello,

I work for 3Dconnexion and I am interested in adding support for our SpaceNavigator device to libSDL. Before submitting patches, I have some questions:

1. first of all, would you be interested in having this device supported? (I hope so Smile)

2. on Linux the SpaceNavigator is a "RELative" event device. I see that event devices can be excluded with SDL_INPUT_LINUXEV: under what circumstances SDL_INPUT_LINUXEV is 0 ?

3. I just started looking at the code, and I'd like to know if there are other special considerations or assumptions regarding event devices in libSDL that I should know.

Thanks,

Ettore Pasquini
Adding SpaceNavigator support to libSDL
Sam Lantinga
Guest

Quote:
I work for 3Dconnexion and I am interested in adding support for our SpaceNavigator device to libSDL.

Great!

Quote:
1. first of all, would you be interested in having this device supported? (I hope so Smile)

Sure! I would recommend starting with SDL 1.3, which is the current development branch of SDL.

Quote:
2. on Linux the SpaceNavigator is a "RELative" event device. I see that event devices can be excluded with SDL_INPUT_LINUXEV: under what circumstances SDL_INPUT_LINUXEV is 0 ?

At this point, I don't think it's ever 0.

Quote:
3. I just started looking at the code, and I'd like to know if there are other special considerations or assumptions regarding event devices in libSDL that I should know.

Not that I can think of offhand, but if you have any questions, feel free to ask.

See ya!
-Sam Lantinga, Lead Software Engineer, Blizzard Entertainment
Adding SpaceNavigator support to libSDL
Ettore Pasquini
Guest

I have something working for the SpaceNavigator. Two questions:

1. To get the correct number of axes I had to add it as a special "relative" event device. This works, but it would be nicer to have SDL inspect the number of axes dynamically. Is there a way to do that with a relative device? I'm not a Linux expert. The code inside EV_ConfigJoystick reports 0 axes (I can't find an analog of EVIOCGABS).

2. Second problem is calibration. How is this achieved in SDL for regular joysticks? A few pointers in the code would suffice.

Thanks,

Ettore
Adding SpaceNavigator support to libSDL
Ettore Pasquini
Guest

I made a patch for adding support to the SpaceNavigator and other 3Dconnexion devices on Linux:

http://cubelogic.org/dev/libsdl/20080428/spacenav-libsdl1.3.patch

To apply, cd into your trunk working copy and give a
$ patch -p0 < spacenav-libsdl1.3.patch

I tested it against the SDLJoytest-GL sample code and it seems to work seamlessly. Basically the new (relative) event devices are recognized as a possible choice.

I think my changes are fairly straightforward but please feel free to ask any questions or give any feedback, especially if there's something missing or wrong. My objective of course would be to see this merged into the trunk.

Ettore
Adding SpaceNavigator support to libSDL
JDE
Guest

This SpaceNavigator mouse looks interesting. Would you be willing to
donate one to the SDL foundation? :^)

On 4/28/08, Ettore Pasquini <Ettore_Pasquini at 3dconnexion.com> wrote:
Quote:
I made a patch for adding support to the SpaceNavigator and other 3Dconnexion devices on Linux:

http://cubelogic.org/dev/libsdl/20080428/spacenav-libsdl1.3.patch

To apply, cd into your trunk working copy and give a
$ patch -p0 < spacenav-libsdl1.3.patch

I tested it against the SDLJoytest-GL sample code and it seems to work seamlessly. Basically the new (relative) event devices are recognized as a possible choice.

I think my changes are fairly straightforward but please feel free to ask any questions or give any feedback, especially if there's something missing or wrong. My objective of course would be to see this merged into the trunk.

Ettore

_______________________________________________
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
Adding SpaceNavigator support to libSDL
Ettore Pasquini
Guest

Sure, no problems, we can donate a couple. I only need to know the address. Please email me in private at ettore_pasquini at 3dconnexion dot com.

I know the SpaceNavigator is already supported on the Mac, so I was wondering, are there any plans for Windows?

Ettore



-----Original Message-----
From: sdl-bounces at lists.libsdl.org on behalf of JDE
Sent: Mon 4/28/2008 5:46 PM
To: A list for developers using the SDL library. (includes SDL-announce)
Subject: Re: [SDL] Adding SpaceNavigator support to libSDL

This SpaceNavigator mouse looks interesting. Would you be willing to
donate one to the SDL foundation? :^)

On 4/28/08, Ettore Pasquini <Ettore_Pasquini at 3dconnexion.com> wrote:
Quote:
I made a patch for adding support to the SpaceNavigator and other 3Dconnexion devices on Linux:

http://cubelogic.org/dev/libsdl/20080428/spacenav-libsdl1.3.patch

To apply, cd into your trunk working copy and give a
$ patch -p0 < spacenav-libsdl1.3.patch

I tested it against the SDLJoytest-GL sample code and it seems to work seamlessly. Basically the new (relative) event devices are recognized as a possible choice.

I think my changes are fairly straightforward but please feel free to ask any questions or give any feedback, especially if there's something missing or wrong. My objective of course would be to see this merged into the trunk.

Ettore

_______________________________________________
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

_______________________________________________
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org