SDL icon indicating copy to clipboard operation
SDL copied to clipboard

Unable to enable Enhanced Reports on DualSense over Bluetooth

Open timoschwarzer opened this issue 1 year ago • 2 comments

In SDL3 it is currently impossible to enable Enhanced Reports over Bluetooth for DualSense controllers. By default, DualSense controllers are in a "basic" mode when connected over bluetooth. In this mode, it doesn't send sensor and touchpad data, nor can you use advanced controller features such as setting LED lights or rumble.

In SDL2 one could set the SDL_HINT_JOYSTICK_HIDAPI_PS5_RUMBLE hint for SDL to put the controller into enhanced mode. In SDL3 the crucial part was removed, leaving the code for enabling enhanced mode unable to be called ever.

SDL2: https://github.com/libsdl-org/SDL/blob/6a2dd96ac7ce5c0575e91290a983048c0e5e6d2c/src/joystick/hidapi/SDL_hidapi_ps5.c#L400-L427 SDL3: https://github.com/libsdl-org/SDL/blob/ba188e7555b873cbb57c9c5ee7ae6dc5a7bd872e/src/joystick/hidapi/SDL_hidapi_ps5.c#L416-L435

On that note, I want to suggest a different name for the hint in SDL3, since I find SDL_HINT_JOYSTICK_HIDAPI_PS5_RUMBLE rather confusing. Since I think most library end users would want to enable the enhanced mode anyways to be able to use all SDL gamepad features, I'd propose enabling enhanced mode by default and adding a hint to disable it specifically: SDL_HINT_JOYSTICK_HIDAPI_PS5_DISABLE_ENHANCED_BLUETOOTH

I'm willing to do the necessary work, but I wanted to gather some opinions about it first.

timoschwarzer avatar Jun 22 '24 11:06 timoschwarzer

FYI, I haven't forgotten about this. I think it's a good idea, and I am going to see if we can default these features on in Steam.

slouken avatar Aug 05 '24 02:08 slouken

Did you mean SDL? :sweat_smile:

timoschwarzer avatar Aug 05 '24 08:08 timoschwarzer

Done! There's a new hint which defaults to true, enabling enhanced reports by default.

slouken avatar Jan 03 '25 01:01 slouken