Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/dinput/joystick_hid.c | 4 ++-- dlls/dinput8/tests/hid.c | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/dlls/dinput/joystick_hid.c b/dlls/dinput/joystick_hid.c index acd21001bdf..4d7bbe82a23 100644 --- a/dlls/dinput/joystick_hid.c +++ b/dlls/dinput/joystick_hid.c @@ -379,8 +379,8 @@ static BOOL enum_collections_objects( struct hid_joystick *impl, const DIPROPHEA { DIDEVICEOBJECTINSTANCEW instance = {.dwSize = sizeof(DIDEVICEOBJECTINSTANCEW)}; struct hid_caps caps = {.type = LINK_COLLECTION_NODE}; + DWORD collection = 0, i; BOOL ret; - DWORD i;
for (i = 0; i < impl->caps.NumberLinkCollectionNodes; ++i) { @@ -393,7 +393,7 @@ static BOOL enum_collections_objects( struct hid_joystick *impl, const DIPROPHEA else { instance.dwOfs = 0; - instance.dwType = DIDFT_COLLECTION | DIDFT_NODATA; + instance.dwType = DIDFT_COLLECTION | DIDFT_MAKEINSTANCE( collection++ ) | DIDFT_NODATA; instance.dwFlags = 0; instance.wUsagePage = caps.node->LinkUsagePage; instance.wUsage = caps.node->LinkUsage; diff --git a/dlls/dinput8/tests/hid.c b/dlls/dinput8/tests/hid.c index 23dc3f6d5f8..54d85cae14b 100644 --- a/dlls/dinput8/tests/hid.c +++ b/dlls/dinput8/tests/hid.c @@ -3572,8 +3572,6 @@ static void test_simple_joystick(void) {.ofs = TRUE}, {.ofs = TRUE}, {.ofs = TRUE}, - {}, - {.type = TRUE}, };
struct check_objects_params check_objects_params =