Skip to content

Commit

Permalink
dinput: Set guidType = GUID_Unknown for HID collections.
Browse files Browse the repository at this point in the history
Fixes an issue in Zusi 3 where DIDFT_COLLECTION objects would be passed
to SetDataFormat.

(cherry picked from commit ba889f2)
CW-Bug-Id: #22257
  • Loading branch information
w-flo authored and rbernon committed May 23, 2023
1 parent 87ca0c6 commit ac90373
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 17 deletions.
2 changes: 1 addition & 1 deletion dlls/dinput/joystick_hid.c
Original file line number Diff line number Diff line change
Expand Up @@ -774,7 +774,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;
Expand Down
17 changes: 1 addition & 16 deletions dlls/dinput/tests/joystick8.c
Original file line number Diff line number Diff line change
Expand Up @@ -730,21 +730,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},
Expand All @@ -761,7 +746,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,
};

Expand Down

0 comments on commit ac90373

Please sign in to comment.