dinput: Ignore objects without a collection in init_pid_caps.

This makes sure we don't try to set effect_state report id from objects
without a collection, causing some false warnings.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Rémi Bernon 2021-12-20 17:47:18 +01:00 committed by Alexandre Julliard
parent e5131028b9
commit 531297a8b4
1 changed files with 3 additions and 0 deletions

View File

@ -1732,6 +1732,9 @@ static BOOL init_pid_caps( struct hid_joystick *impl, struct hid_value_caps *cap
FIXME( "multiple " #rep " report ids!\n" ); \
} while (0)
if (!instance->wCollectionNumber)
return DIENUM_CONTINUE;
if (instance->wCollectionNumber == effect_state->collection)
SET_REPORT_ID( effect_state );