Joystick Information

external links: index . projects . home

in-file links: preamble - downloads - end

Preamble

FlightGear uses PLIB to provide Joystick interface and information, but recently PLIB has been failing to find the NAME of the Joystick. The normal WIN32 system API functions only return the generic name of the drive, like [Microsoft PC-joystick driver], and NOT the name of Joystick.

After some searching around I found some code which WILL give me the actual NAME of the Joystick. In my case it is [Logitech Extreme 3D]. This is found by doing an enumeration using the DirectInput8 (DirectX) interface also provided. At present the code only returns the NAME of the first functioning Joystick found, but it could easily be extended to complete the enumeration, and get all names if more than one Joystick was attached.

I have found this code functions in XP, and Vista ... The joyinfo.EXE below prints out information from the standard API, but then goes on to attempt to get the correct name from the DirectX interface ... and prints out the name it finds ...

top


Downloads!

Some downloads ... as usual, take care downloading and running things from the web. It is highly recommended that you download the source, and compile it yourself. Microsoft offers an 'Express Edition' for free, of their C/C++ IDE tools ...

Downloadable source and binaries for WIN32
Date File Size Notes Digest
Oct, 2008 joyinfoe01.zip 3,995 Runtime 599238cf656aef5bba86e77b7d75978b
Oct, 2008 joyinfo-01.zip 6,460 Source c59a8e95aef5ac14fdd1b8063e11f9aa

 

Have fun ;=))

top


checked by Tidy  Valid XHTML 1.0 Transitional