dinput: Set guidType = GUID_Unknown for HID collections.

Fixes an issue in Zusi 3 where DIDFT_COLLECTION objects would be passed
to SetDataFormat.
This commit is contained in:
Florian Will 2023-04-04 09:32:16 +02:00 committed by Alexandre Julliard
parent 4413356d19
commit ba889f2c4c
2 changed files with 2 additions and 17 deletions

View file

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

View file

@ -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,
};