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

A GUID is a 128-bit identifier for an input device that identifies that device across runs of SDL programs on the same platform. More...

Inheritance diagram for SDL::GUID:
Inheritance graph
[legend]

Public Member Functions

constexpr GUID (SDL_GUID guid)
 Constructor from underling type.
 
 GUID (StringParam pchGUID)
 Convert a GUID string into a GUID structure.
 
std::string ToString () const
 Get an ASCII string representation for a given GUID.
 

Detailed Description

If the device is detached and then re-attached to a different port, or if the base system is rebooted, the device should still report the same GUID.

GUIDs are as precise as possible but are not guaranteed to distinguish physically distinct but equivalent devices. For example, two game controllers from the same vendor with the same product ID and revision may have the same GUID.

GUIDs may be platform-dependent (i.e., the same device may report different GUIDs on different operating systems).

Since
This struct is available since SDL 3.2.0.
Category:
Wrap extending struct
See also
wrap-extending-struct

Constructor & Destructor Documentation

◆ GUID()

SDL::GUID::GUID ( StringParam  pchGUID)
inline

Performs no error checking. If this function is given a string containing an invalid GUID, the function will silently succeed, but the GUID generated will not be useful.

Parameters
pchGUIDstring containing an ASCII representation of a GUID.
Thread safety:
It is safe to call this function from any thread.
Since
This function is available since SDL 3.2.0.
See also
GUID.ToString

Member Function Documentation

◆ ToString()

std::string SDL::GUID::ToString ( ) const
inline
Returns
pszGUID the ASCII string representation for
Thread safety:
It is safe to call this function from any thread.
Since
This function is available since SDL 3.2.0.
See also
GUID.GUID

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