SDL3pp
A slim C++ wrapper for SDL3
Loading...
Searching...
No Matches
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={}) noexcept
 Wraps JoystickID.
constexpr operator JoystickIDRaw () const noexcept
 Unwraps to the underlying JoystickID.
const char * GetJoystickNameForID ()
 Get the implementation dependent name of a joystick.
const char * GetJoystickPathForID ()
 Get the implementation dependent path of a joystick.
int GetJoystickPlayerIndexForID ()
 Get the player index of a joystick.
GUID GetJoystickGUIDForID ()
 Get the implementation-dependent GUID of a joystick.
Uint16 GetJoystickVendorForID ()
 Get the USB vendor ID of a joystick, if available.
Uint16 GetJoystickProductForID ()
 Get the USB product ID of a joystick, if available.
Uint16 GetJoystickProductVersionForID ()
 Get the product version of a joystick, if available.
JoystickType GetJoystickTypeForID ()
 Get the type of a joystick, if available.
Joystick OpenJoystick ()
 Open a joystick for use.
JoystickRef GetJoystickFromID ()
 Get the Joystick associated with an instance ID, if it has been opened.
void DetachVirtualJoystick ()
 Detach a virtual joystick.
bool IsJoystickVirtual ()
 Query whether or not a joystick is virtual.

Detailed Description

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.

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()

SDL::JoystickID::JoystickID ( JoystickIDRaw joystickID = {})
inlineconstexprnoexcept

Wraps JoystickID.

Parameters
joystickIDthe value to be wrapped

Member Function Documentation

◆ operator JoystickIDRaw()

SDL::JoystickID::operator JoystickIDRaw ( ) const
inlineconstexprnoexcept

Unwraps to the underlying JoystickID.

Returns
the underlying JoystickIDRaw.

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