mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-04 17:06:25 +00:00
Use PS4 rumble hint as the default for the PS5 rumble hint
Existing SDL applications may not know about the need to set a specific hint to enable rumble on PS5 controllers, even though they may already set the equivalent SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE hint for PS4 controller rumble support. Rather than requiring those developers update their apps, let's use the SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE value as an indication of the behavior they are expected for all PlayStation controllers.
This commit is contained in:
@@ -624,7 +624,13 @@ HIDAPI_DriverPS5_OpenJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joystick)
|
||||
} else {
|
||||
/* Connected over Bluetooth, using simple reports (DirectInput enabled) */
|
||||
ctx->is_bluetooth = SDL_TRUE;
|
||||
enhanced_mode = SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI_PS5_RUMBLE, SDL_FALSE);
|
||||
|
||||
/* Games written prior the introduction of PS5 controller support in SDL will not be aware of
|
||||
SDL_HINT_JOYSTICK_HIDAPI_PS5_RUMBLE, but they did know SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE.
|
||||
To support apps that only knew about the PS4 hint, we'll use the PS4 hint as the default.
|
||||
*/
|
||||
enhanced_mode = SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI_PS5_RUMBLE,
|
||||
SDL_GetHintBoolean(SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE, SDL_FALSE));
|
||||
}
|
||||
|
||||
if (enhanced_mode) {
|
||||
|
Reference in New Issue
Block a user