[PATCH 4/4] dinput: Ignore objects without a collection in init_pid_caps.
Rémi Bernon
rbernon at codeweavers.com
Mon Dec 20 10:47:18 CST 2021
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 at codeweavers.com>
---
dlls/dinput/joystick_hid.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/dlls/dinput/joystick_hid.c b/dlls/dinput/joystick_hid.c
index dc6067ddeb1..3b02600ce4e 100644
--- a/dlls/dinput/joystick_hid.c
+++ b/dlls/dinput/joystick_hid.c
@@ -1738,6 +1738,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 );
--
2.34.0
More information about the wine-devel
mailing list