On Mon, Jan 24, 2022 at 2:25 AM Arkadiusz Hiler ahiler@codeweavers.com wrote:
On Mon, Jan 24, 2022 at 12:48:21AM +0100, Rémi Bernon wrote:
On 1/22/22 21:01, Roderick Colenbrander wrote:
Hi Arkadiusz,
I'm not a big fan of this type of fixup here (and the same for DS4 to be honest). The DS4/DualSense have unusual HID reports, but this type of fixup causes issues for applications which properly parse the HID data. For example various applications for example do use our libScePad.dll for games on Windows. They go through the Windows HID APIs. This breaks such applications.
Thanks,
Roderick Colenbrander Sony Interactive Entertainment, LLC
Hi Roderick,
Thanks for giving some feedback. The fixups have been added for games and applications which do not expect to receive the extended reports, and only support the reports that are openly described in the HID descriptors.
As Arek has found already, and as you say, some other applications or middlewares are explicitly requesting them, so we were considering adding some more logic to remove the fixups and send the extended reports in the same way as on Windows, when they are requested.
I understand that these extended reports are triggered by some feature report requests, and this is automatically done on Linux by the kernel and evdev driver, to the contrary to what happens on Windows, or maybe there's something we've missed?
Hi folks,
As Rémi has mentioned this is only to "undo" the mode switch that hid_playstation/hid_sony does on Linux for Sony controllers when they are used over Bluetooth.
On Windows those use the basic reports (#1) by default and require getting calibration feature report (#5) to switch modes.
The next patch in this series handles the mode switch: https://source.winehq.org/patches/data/224003
That's at least how SDL does that. If there are more ways to trigger this please let us know so we can support it.
I believe feature report 5 is the main way.
Also after switching the modes the controller no longer works through DirectInput and requires to be reconnected, as it seems to be a one way transition.
I've found a fairly new game that comes with libScePad.dll - God of War. The game does handle DualSense and DualShock 4 over USB only. When those contollers are connected over Bluetooth the game does not detect them.
Correct, libScePad.dll doesn't handle Bluetooth devices and I'm not sure why that decision was made (on older Windows version there inconsistent Bluetooth stacks, so may have been related).
If you have any suggestions for a game that I could use for testing the Bluetooth extended mode switching please let me know.
Unfortunately I don't know other games by head as I'm not part of the Windows / game support teams. A good starting point would probably be Sony games e.g. Horizon. There have been some other published as well.
-- Cheers, Arek
Overall I'm not sure what the best thing to do is. As I shared in the other email various other applications (e.g. Chrome) do handle the extended report data properly and would thus break.
One method, but also not ideal at all. Would be to override the device descriptors and report it as a USB device. However that would mean spoofing various other reports as well and would make more like hid-sony/hid-playstation. It would be the most compatible way and not break other applications.
I really hate HID so bad it is such a poor abstraction and since every application accesses the device directly any state is lost (e.g. for our devices you can change power management, reporting speed, light colors and more).
Thanks, Roderick