winejoystick.drv: Add axis remapping support
Adolfo R. Brandes
arbrandes at gmail.com
Wed Feb 27 09:21:44 CST 2008
Greetings!
The purpose of this patch is to add registry axis remapping and POV
hat support to winejoystick.drv, much like what's already in place for
dinput/joystick_linux.c. I needed this for X-Wing Alliance
(http://appdb.winehq.org/objectManager.php?sClass=application&iId=2110),
which recognizes my Thrustmaster Top Gun Fox 2 Pro USB joystick, but
not the POV hat and with the Rudder and Throttle axes switched around.
It uses the following conventions:
HKCU\Software\Wine\Joystick\<joyname> = <axeslist>
or
HKCU\Software\Wine\AppDefaults\app.exe\Joystick\<joyname> = <axeslist>
Where <joyname> is the device name (as shown in jstest), and
<axeslist> is a comma-separated list of axis names. However, in
contrast to joystick_linux.c, the axis names are the same as in
jstest. For example, in my case jstest reports:
Joystick (THRUSTMASTER Top Gun Fox 2 Pro ) has 6 axes (X, Y, Rz,
Throttle, Hat0X, Hat0Y)
Since I want to change Rz and Throttle around for X-Wing Alliance,
this is what my registry key looks like (notice that you must include
all spaces in the device name):
HKCU\Software\Wine\Joystick\"THRUSTMASTER Top Gun Fox 2 Pro " =
"X,Y,Throttle,Rz,Hat0X,Hat0Y"
And since I have a Hat* axis, the driver will report to the game
that I have a POV (i.e., JOY_HASPOV).
I hope it helps,
Adolfo R. Brandes
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Adding-axis-remapping-support-in-registry.patch
Type: text/x-patch
Size: 12137 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20080227/bf20bac0/attachment-0001.bin
More information about the wine-patches
mailing list