SDL3pp
A slim C++ wrapper for SDL3
Loading...
Searching...
No Matches
Public Member Functions | List of all members
SDL::JoystickID Class Reference

This is a unique ID for a joystick for the time it is connected to the system, and is never reused for the lifetime of the application. More...

Public Member Functions

constexpr JoystickID (JoystickIDRaw joystickID={})
 Wraps JoystickID. More...
 
constexpr bool operator== (const JoystickID &other) const =default
 Default comparison operator.
 
constexpr bool operator== (JoystickIDRaw joystickID) const
 Compares with the underlying type.
 
constexpr operator JoystickIDRaw () const
 Unwraps to the underlying JoystickID. More...
 
const char * GetJoystickNameForID ()
 Get the implementation dependent name of a joystick. More...
 
const char * GetJoystickPathForID ()
 Get the implementation dependent path of a joystick. More...
 
int GetJoystickPlayerIndexForID ()
 Get the player index of a joystick. More...
 
GUID GetJoystickGUIDForID ()
 Get the implementation-dependent GUID of a joystick. More...
 
Uint16 GetJoystickVendorForID ()
 Get the USB vendor ID of a joystick, if available. More...
 
Uint16 GetJoystickProductForID ()
 Get the USB product ID of a joystick, if available. More...
 
Uint16 GetJoystickProductVersionForID ()
 Get the product version of a joystick, if available. More...
 
JoystickType GetJoystickTypeForID ()
 Get the type of a joystick, if available. More...
 
Joystick OpenJoystick ()
 Open a joystick for use. More...
 
JoystickRef GetJoystickFromID ()
 Get the Joystick associated with an instance ID, if it has been opened. More...
 
void DetachVirtualJoystick ()
 Detach a virtual joystick. More...
 
bool IsJoystickVirtual ()
 Query whether or not a joystick is virtual. More...
 

Detailed Description

If the joystick is disconnected and reconnected, it will get a new ID.

The value 0 is an invalid ID.

Since
This datatype is available since SDL 3.2.0.

Constructor & Destructor Documentation

◆ JoystickID()

constexpr SDL::JoystickID::JoystickID ( JoystickIDRaw  joystickID = {})
inlineconstexpr
Parameters
joystickIDthe value to be wrapped

Member Function Documentation

◆ operator JoystickIDRaw()

constexpr SDL::JoystickID::operator JoystickIDRaw ( ) const
inlineconstexpr
Returns
the underlying JoystickIDRaw.

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