You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/** * \brief Game controller button event structure (event.cbutton.*) */typedefstructSDL_ControllerButtonEvent
{
Uint32type; /**< ::SDL_CONTROLLERBUTTONDOWN or ::SDL_CONTROLLERBUTTONUP */Uint32timestamp; /**< In milliseconds, populated using SDL_GetTicks() */SDL_JoystickIDwhich; /**< The joystick instance id */Uint8button; /**< The controller button (SDL_GameControllerButton) */Uint8state; /**< ::SDL_PRESSED or ::SDL_RELEASED */Uint8padding1;
Uint8padding2;
} SDL_ControllerButtonEvent;
cbutton.state currently supports only two values: SDL_PRESSED and SDL_RELEASED. It would be nice to see state containing values from 0 to 255, indicating the pressure. (after enabling a newly introduced hint, to not break backwards compatibility)
Or we can reuse padding1 and padding2 as Uint16 or whatever for new pressure member of SDL_ControllerButtonEvent structure.
This can be used when DualShock 3 is connected, because it's buttons are analog and it sends pressure data to the system.
I would like to look at this myself and try to implement it. But I'm creating this issue beforehand to get general feedback if SDL wants this feature at all and maybe some useful hints on implementation.
The text was updated successfully, but these errors were encountered:
Sony dropped the analog face buttons for the PS4 (PS2 and PS3 had them, and a handful of games used them: the Metal Gear Solid series would let you slowly lift a finger to lower a weapon without firing it, some racing game would accelerate based on pressure, etc), but I suspect most players never knew the buttons were analog at all, new controllers don't have the feature, and no other vendor ever supported it.
Just in case someone found this issue and doesn't know – there was another attempt to request this feature in #5148 and it was successful!
Requested feature was added. See #5148 for details.
cbutton.state currently supports only two values: SDL_PRESSED and SDL_RELEASED. It would be nice to see
state
containing values from 0 to 255, indicating the pressure. (after enabling a newly introduced hint, to not break backwards compatibility)Or we can reuse
padding1
andpadding2
as Uint16 or whatever for newpressure
member ofSDL_ControllerButtonEvent
structure.This can be used when DualShock 3 is connected, because it's buttons are analog and it sends pressure data to the system.
I would like to look at this myself and try to implement it. But I'm creating this issue beforehand to get general feedback if SDL wants this feature at all and maybe some useful hints on implementation.
The text was updated successfully, but these errors were encountered: