Added the ability to specify which buttons and axes are present for virtual controllers
This commit is contained in:
parent
49ca8bf520
commit
bfac54b59c
2 changed files with 116 additions and 80 deletions
|
@ -365,6 +365,10 @@ typedef struct SDL_VirtualJoystickDesc
|
|||
Uint16 vendor_id; /**< the USB vendor ID of this joystick */
|
||||
Uint16 product_id; /**< the USB product ID of this joystick */
|
||||
Uint16 padding; /**< unused */
|
||||
Uint32 button_mask; /**< A mask of which buttons are valid for this controller
|
||||
e.g. (1 << SDL_CONTROLLER_BUTTON_A) */
|
||||
Uint32 axis_mask; /**< A mask of which axes are valid for this controller
|
||||
e.g. (1 << SDL_CONTROLLER_AXIS_LEFTX) */
|
||||
const char *name; /**< the name of the joystick */
|
||||
|
||||
void *userdata; /**< User data pointer passed to callbacks */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue