dinput: Fix POV for programs that use buffered events.

This commit is contained in:
Vitaliy Margolen 2009-09-10 23:03:47 -06:00 committed by Alexandre Julliard
parent fd74347241
commit 8c279bb80b
2 changed files with 4 additions and 2 deletions

View File

@ -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);

View File

@ -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) {