https://bugs.winehq.org/show_bug.cgi?id=51873
--- Comment #4 from Ivo Ivanov logos128@gmail.com --- (In reply to Rémi Bernon from comment #3)
Thanks! Forgot to add that the device names listed in HIDRAW (UDEV bus) mode include only the first words from the names - i.e. just "FANATEC" instead of "FANATEC ClubSport Pedals", or "Granite" instead of "Granite Devices Simucube 2 Sport". While in SDL bus mode they appear properly.
For instance, I believe it's not properly checking the effect creation and assumes it succeeds as long as the effect type has been enumerated by EnumEffect / GetEffectInfo, even though it could fail depending on the effect parameters used. That may be what is happening for you.
Indeed, seems this is the initial issue. I looked the code and during the initialization phase the enum_callback() is called to enumerate the devices, which calls ff_effects_callback() to create the effects. It calls CreateEffect, which would release the effect buffer and null the pointer in case of an error. I believe this is what happens here. The Initialization function probably passes, but the SetParameters looks like to cause the issue. I'll probably have to debug it further. The Simucube 2 doesn't include the Start Delay parameter from the Set Effect report, and strangely Negative Coefficient and Dead Band from the Condition report. On first site this shouldn't cause problems in the SetParameters function, but who knows. I have attached the Simucube 2 report descriptor for further reference.
Regarding the buttons I considered raising the limit but then the layout was not very flexible. I'll have a look at your change, and see if we can maybe change the way it's presented to better support large number of buttons.
I attached a new dinput patch with an updated description for the second issue from my initial report. Yesterday mistakenly wrote "Report Count" 1, while I meant of course "Report Size" 1. As everything with Report Size 1 is considered a button in hidparse.sys (HID_VALUE_CAPS_IS_BUTTON), when enumerating PID input reports in the joystick_hid.c' enum_objects() function, it counts those parameters as buttons. The result is total number of 134 buttons (caps.dwButtons) instead of 128. Here is an excerpt from the descriptor:
/* Usage Page (PID), */ /* Usage (92h), */ /* Collection (Logical), */ /* Report ID (2), */ /* Usage (9Fh), */ /* Usage (A0h), */ /* Usage (A4h), */ /* Usage (A5h), */ /* Usage (A6h), */ /* Logical Minimum (0), */ /* Logical Maximum (1), */ /* Physical Minimum (0), */ /* Physical Maximum (1), */ /* Report Size (1), */ /* Report Count (5), */ /* Input (Variable), */ /* Report Count (3), */ /* Input (Constant, Variable), */ /* Usage (94h), */ /* Logical Minimum (0), */ /* Logical Maximum (1), */ /* Physical Minimum (0), */ /* Physical Maximum (1), */ /* Report Size (1), */ /* Report Count (1), */ /* Input (Variable), */ /* Usage (22h), */ /* Logical Minimum (1), */ /* Logical Maximum (40), */ /* Physical Minimum (1), */ /* Physical Maximum (40), */ /* Report Size (7), */ /* Report Count (1), */ /* Input (Variable), */ /* End Collection, */