From: "Rémi Bernon" Subject: Re: [PATCH 3/4] winebus.sys: Enable extended BT reports for Sony controllers when requested. Message-Id: <6dbd8229-6ec2-2c1d-32be-7b27176476b0@codeweavers.com> Date: Fri, 21 Jan 2022 23:58:59 +0100 In-Reply-To: <20220121161044.911068-3-ahiler@codeweavers.com> References: <20220121161044.911068-1-ahiler@codeweavers.com> <20220121161044.911068-3-ahiler@codeweavers.com> On 1/21/22 17:10, Arkadiusz Hiler wrote: > SDL does that when calling SDL_GameControllerSetSensorEnabled() on > supported controllers. > > This is a one-way transition, i.e. cannot be undone without re-plugging > the controller or rebooting. > > Signed-off-by: Arkadiusz Hiler > --- > dlls/winebus.sys/bus_udev.c | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/dlls/winebus.sys/bus_udev.c b/dlls/winebus.sys/bus_udev.c > index c290cea6f4f..ea54e19df47 100644 > --- a/dlls/winebus.sys/bus_udev.c > +++ b/dlls/winebus.sys/bus_udev.c > @@ -442,6 +442,17 @@ static void hidraw_device_get_feature_report(struct unix_device *iface, HID_XFER > { > io->Information = count; > io->Status = STATUS_SUCCESS; > + > + /* disable DS4 report quirk when we get calibration feature report */ > + if ((impl->quirks & QUIRK_DS4_BT) && packet->reportId == 0x5) > + impl->quirks &= ~QUIRK_DS4_BT; > + > + /* disable DualSense report quirk when we get calibration feature report */ > + if ((impl->quirks & QUIRK_DUALSENSE_BT) && packet->reportId == 0x5) > + { > + TRACE("unquirking dualsense\n"); > + impl->quirks &= ~QUIRK_DUALSENSE_BT; > + } > } > else > { Looks okay, but there could be a message for the DS4 code too. Something more readable like "Disabling DS4 controller quirks" could be nice, maybe including the device pointer so we can match it in the log. -- Rémi Bernon