From ba889f2c4c4e17007653bf9a93e58787859358e2 Mon Sep 17 00:00:00 2001 From: Florian Will Date: Tue, 4 Apr 2023 09:32:16 +0200 Subject: [PATCH] dinput: Set guidType = GUID_Unknown for HID collections. Fixes an issue in Zusi 3 where DIDFT_COLLECTION objects would be passed to SetDataFormat. --- dlls/dinput/joystick_hid.c | 2 +- dlls/dinput/tests/joystick8.c | 17 +---------------- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/dlls/dinput/joystick_hid.c b/dlls/dinput/joystick_hid.c index 42f58c52202..3320ac92a1c 100644 --- a/dlls/dinput/joystick_hid.c +++ b/dlls/dinput/joystick_hid.c @@ -728,7 +728,7 @@ static BOOL enum_objects( struct hid_joystick *impl, const DIPROPHEADER *filter, instance.dwFlags = 0; instance.wUsagePage = node->usage_page; instance.wUsage = node->usage; - instance.guidType = *object_usage_to_guid( instance.wUsagePage, instance.wUsage ); + instance.guidType = GUID_Unknown; instance.wReportId = 0; instance.wCollectionNumber = node->parent; instance.dwDimension = 0; diff --git a/dlls/dinput/tests/joystick8.c b/dlls/dinput/tests/joystick8.c index a5c0b3958a4..2eb12bd3ba2 100644 --- a/dlls/dinput/tests/joystick8.c +++ b/dlls/dinput/tests/joystick8.c @@ -1777,21 +1777,6 @@ static void test_simple_joystick( DWORD version ) .wReportId = 1, }, }; - struct check_object_todo todo_objects[ARRAY_SIZE(expect_objects)] = - { - {0}, - {0}, - {0}, - {0}, - {0}, - {0}, - {0}, - {0}, - {0}, - {0}, - {0}, - { .guid = TRUE }, - }; struct check_object_todo todo_objects_5[ARRAY_SIZE(expect_objects_5)] = { {.guid = TRUE, .type = TRUE, .flags = TRUE, .usage = TRUE, .usage_page = TRUE, .name = TRUE}, @@ -1808,7 +1793,7 @@ static void test_simple_joystick( DWORD version ) .version = version, .expect_count = version < 0x700 ? ARRAY_SIZE(expect_objects_5) : ARRAY_SIZE(expect_objects), .expect_objs = version < 0x700 ? expect_objects_5 : expect_objects, - .todo_objs = version < 0x700 ? todo_objects_5 : todo_objects, + .todo_objs = version < 0x700 ? todo_objects_5 : NULL, .todo_extra = version < 0x700, };