From 531297a8b4c3125c92b2bd0d10058bc753939fd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Bernon?= Date: Mon, 20 Dec 2021 17:47:18 +0100 Subject: [PATCH] dinput: Ignore objects without a collection in init_pid_caps. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Alexandre Julliard --- 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 682af063ff1..64ddce3c7b0 100644 --- a/dlls/dinput/joystick_hid.c +++ b/dlls/dinput/joystick_hid.c @@ -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 );