Commit 8c279bb8 authored by Vitaliy Margolen's avatar Vitaliy Margolen Committed by Alexandre Julliard

dinput: Fix POV for programs that use buffered events.

parent fd743472
......@@ -582,7 +582,8 @@ static void joy_polldev(JoystickGenericImpl *This_in) {
int number = This->generic.axis_map[jse.number]; /* wine format object index */
if (number < 0) return;
inst_id = DIDFT_MAKEINSTANCE(number) | (number < 8 ? DIDFT_ABSAXIS : DIDFT_POV);
inst_id = number < 8 ? DIDFT_MAKEINSTANCE(number) | DIDFT_ABSAXIS :
DIDFT_MAKEINSTANCE(number - 8) | DIDFT_POV;
value = joystick_map_axis(&This->generic.props[id_to_object(This->generic.base.data_format.wine_df, inst_id)], jse.value);
TRACE("changing axis %d => %d\n", jse.number, number);
......
......@@ -779,7 +779,8 @@ static void joy_polldev(JoystickGenericImpl *iface)
axis = This->generic.axis_map[axis];
if (axis < 0) break;
inst_id = DIDFT_MAKEINSTANCE(axis) | (axis < 8 ? DIDFT_ABSAXIS : DIDFT_POV);
inst_id = axis < 8 ? DIDFT_MAKEINSTANCE(axis) | DIDFT_ABSAXIS :
DIDFT_MAKEINSTANCE(axis - 8) | DIDFT_POV;
value = joystick_map_axis(&This->generic.props[id_to_object(This->generic.base.data_format.wine_df, inst_id)], ie.value);
switch (axis) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment