3noix / UJPS

Universal Joystick Programing Software (C++)
GNU Lesser General Public License v3.0
16 stars 3 forks source link

Improvement: add support for 3Dconnexion devices as inputs #24

Closed 3noix closed 5 years ago

3noix commented 5 years ago

Today, for inputs, UJPS supports:

It would be interesting to also support 3Dconnexion devices... according to info I got, they are not recognized as Windows game controllers.

3noix commented 5 years ago

I just looked in detail into it, and unfortunately the 3Dconnexion API is not very suited for what we need: the only way to access the values / states of the axes and buttons is by relying on events. An event filter using Windows API must be set at the top to intercept Windows messages related to space mouse. So it involves modifying the top function(s) of each app, which would not cleanly integrate into the UJPS code design. Currently there is nothing to get the current values / states of axes / buttons, just like "GetDeviceState" of DirectInput or "XInputGetState" of XInput, which would solve the issue.

Moreover, it seems that some work is being done in this direction (https://www.3dconnexion.com/forum/viewtopic.php?f=19&t=38253), so I would rather "wait and see" for a more suitable 3Dconnexion API.