diff --git a/dlls/dinput8/tests/hid.c b/dlls/dinput8/tests/hid.c index 2694391bc4e..d29cad5690f 100644 --- a/dlls/dinput8/tests/hid.c +++ b/dlls/dinput8/tests/hid.c @@ -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 ); diff --git a/dlls/hidparse.sys/main.c b/dlls/hidparse.sys/main.c index ca102765f93..f577ef952c3 100644 --- a/dlls/hidparse.sys/main.c +++ b/dlls/hidparse.sys/main.c @@ -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;