dinput/linuxinput: Remap wheel axes to X, Y, and Z.
Signed-off-by: Tim Schumacher <timschumi@gmx.de> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
eb69fa7e73
commit
5d51d8a25e
|
@ -502,13 +502,17 @@ static JoystickImpl *alloc_device(REFGUID rguid, IDirectInputImpl *dinput, unsig
|
||||||
/* Count number of available axes - supported Axis & POVs */
|
/* Count number of available axes - supported Axis & POVs */
|
||||||
for (i = 0; i < ABS_MAX; i++)
|
for (i = 0; i < ABS_MAX; i++)
|
||||||
{
|
{
|
||||||
if (i < WINE_JOYSTICK_MAX_AXES &&
|
if (idx < WINE_JOYSTICK_MAX_AXES &&
|
||||||
|
i < ABS_HAT0X &&
|
||||||
test_bit(newDevice->joydev->absbits, i))
|
test_bit(newDevice->joydev->absbits, i))
|
||||||
{
|
{
|
||||||
newDevice->generic.device_axis_count++;
|
newDevice->generic.device_axis_count++;
|
||||||
newDevice->dev_axes_to_di[i] = idx;
|
newDevice->dev_axes_to_di[i] = idx;
|
||||||
newDevice->generic.props[idx].lDevMin = newDevice->joydev->axes[i].minimum;
|
newDevice->generic.props[idx].lDevMin = newDevice->joydev->axes[i].minimum;
|
||||||
newDevice->generic.props[idx].lDevMax = newDevice->joydev->axes[i].maximum;
|
newDevice->generic.props[idx].lDevMax = newDevice->joydev->axes[i].maximum;
|
||||||
|
if (i >= 8 && i <= 10) /* If it's a wheel axis... */
|
||||||
|
default_axis_map[idx] = i - 8; /* ... remap to X/Y/Z */
|
||||||
|
else
|
||||||
default_axis_map[idx] = i;
|
default_axis_map[idx] = i;
|
||||||
idx++;
|
idx++;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue