Module: wine Branch: master Commit: 531297a8b4c3125c92b2bd0d10058bc753939fd6 URL: https://source.winehq.org/git/wine.git/?a=commit;h=531297a8b4c3125c92b2bd0d1...
Author: Rémi Bernon rbernon@codeweavers.com Date: Mon Dec 20 17:47:18 2021 +0100
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
---
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 );