pub unsafe extern "C" fn SDL_SetJoystickVirtualButton(
joystick: *mut SDL_Joystick,
button: c_int,
down: bool,
) -> boolExpand description
Set the state of a button on an opened virtual joystick.
Please note that values set here will not be applied until the next call to SDL_UpdateJoysticks, which can either be called directly, or can be called indirectly through various other SDL APIs, including, but not limited to the following: SDL_PollEvent, SDL_PumpEvents, SDL_WaitEventTimeout, SDL_WaitEvent.
Parameter: joystick the virtual joystick on which to set state. Parameter: button the index of the button on the virtual joystick to update. Parameter: down true if the button is pressed, false otherwise. Returns: true on success or false on failure; call SDL_GetError() for more information.
Thread Safety: It is safe to call this function from any thread.
Available Since: This function is available since SDL 3.2.0.
See Also: SDL_SetJoystickVirtualAxis See Also: SDL_SetJoystickVirtualBall See Also: SDL_SetJoystickVirtualHat See Also: SDL_SetJoystickVirtualTouchpad See Also: SDL_SetJoystickVirtualSensorData