Commit 9aaea0c1 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

hidparse.sys: Output array caps data indexes in the correct order.

parent d6c47adc
......@@ -3174,9 +3174,7 @@ static void test_hidp_kdr(void)
check_member( kdr->caps[i], expect_caps[i], "%d", string_max );
check_member( kdr->caps[i], expect_caps[i], "%d", designator_min );
check_member( kdr->caps[i], expect_caps[i], "%d", designator_max );
todo_wine_if( !(kdr->caps[i].bit_field & 2) && !(kdr->caps[i].flags & HIDP_KDR_CAPS_IS_RANGE) )
check_member( kdr->caps[i], expect_caps[i], "%#x", data_index_min );
todo_wine_if( !(kdr->caps[i].bit_field & 2) && !(kdr->caps[i].flags & HIDP_KDR_CAPS_IS_RANGE) )
check_member( kdr->caps[i], expect_caps[i], "%#x", data_index_max );
todo_wine_if( expect_caps[i].null_value )
check_member( kdr->caps[i], expect_caps[i], "%d", null_value );
......
......@@ -384,9 +384,9 @@ static BOOL parse_new_value_caps( struct hid_parser_state *state, HIDP_REPORT_TY
for (i = 0; i < usages_size; ++i)
{
if (!is_array) start_bit -= state->items.report_count * state->items.bit_size;
else if (i < usages_size - 1) state->items.flags |= HID_VALUE_CAPS_ARRAY_HAS_MORE;
else if (i) state->items.flags |= HID_VALUE_CAPS_ARRAY_HAS_MORE;
else state->items.flags &= ~HID_VALUE_CAPS_ARRAY_HAS_MORE;
add_new_value_caps( state, values, i, start_bit );
add_new_value_caps( state, values, is_array ? usages_size - i - 1 : i, start_bit );
if (!is_array) state->items.report_count = 1;
}
state->caps_count[type] += usages_size;
......
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