My Project
Loading...
Searching...
No Matches
SDL_VirtualJoystickDesc Struct Reference

#include <SDL_joystick.h>

Public Member Functions

 void (SDLCALL *Update)(void *userdata)
 
 void (SDLCALL *SetPlayerIndex)(void *userdata
 
 int (SDLCALL *Rumble)(void *userdata
 
 int (SDLCALL *RumbleTriggers)(void *userdata
 
 int (SDLCALL *SetLED)(void *userdata
 
 int (SDLCALL *SendEffect)(void *userdata
 

Data Fields

Uint16 version
 
Uint16 type
 
Uint16 naxes
 
Uint16 nbuttons
 
Uint16 nhats
 
Uint16 vendor_id
 
Uint16 product_id
 
Uint16 padding
 
Uint32 button_mask
 
Uint32 axis_mask
 
const char * name
 
voiduserdata
 
int player_index
 
Uint16 low_frequency_rumble
 
Uint16 Uint16 high_frequency_rumble
 
Uint16 left_rumble
 
Uint16 Uint16 right_rumble
 
Uint8 red
 
Uint8 Uint8 green
 
Uint8 Uint8 Uint8 blue
 
const voiddata
 
const void int size
 

Detailed Description

The structure that defines an extended virtual joystick description

The caller must zero the structure and then initialize the version with SDL_VIRTUAL_JOYSTICK_DESC_VERSION before passing it to SDL_JoystickAttachVirtualEx() All other elements of this structure are optional and can be left 0.

See also
SDL_JoystickAttachVirtualEx

Member Function Documentation

◆ void()

void ( SDLCALL *  Update)

Called when the joystick state should be updated

Field Documentation

◆ axis_mask

Uint32 axis_mask

A mask of which axes are valid for this controller e.g. (1 << SDL_CONTROLLER_AXIS_LEFTX)

◆ blue

Uint8 Uint8 Uint8 blue

◆ button_mask

Uint32 button_mask

A mask of which buttons are valid for this controller e.g. (1 << SDL_CONTROLLER_BUTTON_A)

◆ high_frequency_rumble

Uint16 Uint16 high_frequency_rumble

◆ name

const char* name

the name of the joystick

◆ naxes

Uint16 naxes

the number of axes on this joystick

◆ nbuttons

Uint16 nbuttons

the number of buttons on this joystick

◆ nhats

Uint16 nhats

the number of hats on this joystick

◆ padding

Uint16 padding

unused

◆ player_index

int player_index

Called when the player index is set

◆ product_id

Uint16 product_id

the USB product ID of this joystick

◆ right_rumble

Uint16 Uint16 right_rumble

◆ size

const void int size

◆ type

Uint16 type

SDL_JoystickType

◆ userdata

void* userdata

User data pointer passed to callbacks

◆ vendor_id

Uint16 vendor_id

the USB vendor ID of this joystick

◆ version

Uint16 version

SDL_VIRTUAL_JOYSTICK_DESC_VERSION


The documentation for this struct was generated from the following file: