|
SDL 3.0
|
#include <SDL_joystick.h>
Data Fields | |
| Uint32 | version |
| Uint16 | type |
| Uint16 | padding |
| Uint16 | vendor_id |
| Uint16 | product_id |
| Uint16 | naxes |
| Uint16 | nbuttons |
| Uint16 | nballs |
| Uint16 | nhats |
| Uint16 | ntouchpads |
| Uint16 | nsensors |
| Uint16 | padding2 [2] |
| Uint32 | button_mask |
| Uint32 | axis_mask |
| const char * | name |
| const SDL_VirtualJoystickTouchpadDesc * | touchpads |
| const SDL_VirtualJoystickSensorDesc * | sensors |
| void * | userdata |
| void(* | Update )(void *userdata) |
| void(* | SetPlayerIndex )(void *userdata, int player_index) |
| bool(* | Rumble )(void *userdata, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) |
| bool(* | RumbleTriggers )(void *userdata, Uint16 left_rumble, Uint16 right_rumble) |
| bool(* | SetLED )(void *userdata, Uint8 red, Uint8 green, Uint8 blue) |
| bool(* | SendEffect )(void *userdata, const void *data, int size) |
| bool(* | SetSensorsEnabled )(void *userdata, bool enabled) |
| void(* | Cleanup )(void *userdata) |
The structure that describes a virtual joystick.
This structure should be initialized using SDL_INIT_INTERFACE(). All elements of this structure are optional.
Definition at line 480 of file SDL_joystick.h.
| Uint32 SDL_VirtualJoystickDesc::axis_mask |
A mask of which axes are valid for this controller e.g. (1 << SDL_GAMEPAD_AXIS_LEFTX)
Definition at line 496 of file SDL_joystick.h.
| Uint32 SDL_VirtualJoystickDesc::button_mask |
A mask of which buttons are valid for this controller e.g. (1 << SDL_GAMEPAD_BUTTON_SOUTH)
Definition at line 494 of file SDL_joystick.h.
| void(* SDL_VirtualJoystickDesc::Cleanup) (void *userdata) |
Cleans up the userdata when the joystick is detached
Definition at line 510 of file SDL_joystick.h.
| const char* SDL_VirtualJoystickDesc::name |
the name of the joystick
Definition at line 498 of file SDL_joystick.h.
| Uint16 SDL_VirtualJoystickDesc::naxes |
the number of axes on this joystick
Definition at line 487 of file SDL_joystick.h.
| Uint16 SDL_VirtualJoystickDesc::nballs |
the number of balls on this joystick
Definition at line 489 of file SDL_joystick.h.
| Uint16 SDL_VirtualJoystickDesc::nbuttons |
the number of buttons on this joystick
Definition at line 488 of file SDL_joystick.h.
| Uint16 SDL_VirtualJoystickDesc::nhats |
the number of hats on this joystick
Definition at line 490 of file SDL_joystick.h.
| Uint16 SDL_VirtualJoystickDesc::nsensors |
the number of sensors on this joystick, requires sensors to point at valid descriptions
Definition at line 492 of file SDL_joystick.h.
| Uint16 SDL_VirtualJoystickDesc::ntouchpads |
the number of touchpads on this joystick, requires touchpads to point at valid descriptions
Definition at line 491 of file SDL_joystick.h.
| Uint16 SDL_VirtualJoystickDesc::padding |
unused
Definition at line 484 of file SDL_joystick.h.
| Uint16 SDL_VirtualJoystickDesc::padding2[2] |
unused
Definition at line 493 of file SDL_joystick.h.
| Uint16 SDL_VirtualJoystickDesc::product_id |
the USB product ID of this joystick
Definition at line 486 of file SDL_joystick.h.
| bool(* SDL_VirtualJoystickDesc::Rumble) (void *userdata, Uint16 low_frequency_rumble, Uint16 high_frequency_rumble) |
Implements SDL_RumbleJoystick()
Definition at line 505 of file SDL_joystick.h.
| bool(* SDL_VirtualJoystickDesc::RumbleTriggers) (void *userdata, Uint16 left_rumble, Uint16 right_rumble) |
Implements SDL_RumbleJoystickTriggers()
Definition at line 506 of file SDL_joystick.h.
Implements SDL_SendJoystickEffect()
Definition at line 508 of file SDL_joystick.h.
| const SDL_VirtualJoystickSensorDesc* SDL_VirtualJoystickDesc::sensors |
A pointer to an array of sensor descriptions, required if nsensors is > 0
Definition at line 500 of file SDL_joystick.h.
Implements SDL_SetJoystickLED()
Definition at line 507 of file SDL_joystick.h.
| void(* SDL_VirtualJoystickDesc::SetPlayerIndex) (void *userdata, int player_index) |
Called when the player index is set
Definition at line 504 of file SDL_joystick.h.
Implements SDL_SetGamepadSensorEnabled()
Definition at line 509 of file SDL_joystick.h.
| const SDL_VirtualJoystickTouchpadDesc* SDL_VirtualJoystickDesc::touchpads |
A pointer to an array of touchpad descriptions, required if ntouchpads is > 0
Definition at line 499 of file SDL_joystick.h.
| Uint16 SDL_VirtualJoystickDesc::type |
Definition at line 483 of file SDL_joystick.h.
| void(* SDL_VirtualJoystickDesc::Update) (void *userdata) |
Called when the joystick state should be updated
Definition at line 503 of file SDL_joystick.h.
| void* SDL_VirtualJoystickDesc::userdata |
User data pointer passed to callbacks
Definition at line 502 of file SDL_joystick.h.
| Uint16 SDL_VirtualJoystickDesc::vendor_id |
the USB vendor ID of this joystick
Definition at line 485 of file SDL_joystick.h.
| Uint32 SDL_VirtualJoystickDesc::version |
the version of this interface
Definition at line 482 of file SDL_joystick.h.