TSdlJoystickID
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.
Definition
Unit: Neslib.Sdl3.Input
Properties
Name | Description |
---|---|
Guid | The implementation-dependent GUID of the joystick. |
ID | |
IsGamepad | Whether this joystick is supported by the gamepad interface. |
IsVirtual | Whether or not this joystick is virtual. |
Kind | The type of a joystick, if available. |
Name | The implementation dependent name of the joystick or an empty string if not available. |
Path | The implementation dependent path of the joystick or an empty string if not available. |
PlayerIndex | Get the player index of the joystick, or -1 of not available. |
Product | The USB product ID of the joystick, if available. |
ProductVersion | The product version of the joystick, if available. |
Vendor | The USB vendor ID of the joystick, if available. |
Operators
Name | Description |
---|---|
Equal(TSdlJoystickID, TSdlJoystickID) | Used to compare against another TSdlJoystickID. |
Equal(TSdlJoystickID, Cardinal) | Used to compare against 0 . |
Implicit | Used to set the value to 0 . |
NotEqual(TSdlJoystickID, TSdlJoystickID) | Used to compare against another TSdlJoystickID. |
NotEqual(TSdlJoystickID, Cardinal) | Used to compare against 0 . |
Property Descriptions
Guid
The implementation-dependent GUID of the joystick.
This can be used before any joysticks are opened.
property Guid: TGuid read GetGuid
Type: TGuid
See Also
ID
property ID: Cardinal read FHandle
Type: Cardinal
IsGamepad
Whether this joystick is supported by the gamepad interface.
property IsGamepad: Boolean read GetIsGamepad
Type: Boolean
See Also
IsVirtual
Whether or not this joystick is virtual.
property IsVirtual: Boolean read GetIsVirtual
Type: Boolean
Kind
The type of a joystick, if available.
This can be used before any joysticks are opened.
property Kind: TSdlJoystickKind read GetKind
Type: TSdlJoystickKind
See Also
Name
The implementation dependent name of the joystick or an empty string if not available.
This can be used before any joysticks are opened.
property Name: String read GetName
Type: String
See Also
Path
The implementation dependent path of the joystick or an empty string if not available.
This can be used before any joysticks are opened.
property Path: String read GetPath
Type: String
See Also
PlayerIndex
Get the player index of the joystick, or -1 of not available.
This can be used before any joysticks are opened.
property PlayerIndex: Integer read GetPlayerIndex
Type: Integer
See Also
Product
The USB product ID of the joystick, if available.
This can be used before any joysticks are opened. If the product ID isn't available this property returns 0.
property Product: Word read GetProduct
Type: Word
See Also
ProductVersion
The product version of the joystick, if available.
This can be used before any joysticks are opened. If the product version isn't available this property returns 0.
property ProductVersion: Word read GetProductVersion
Type: Word
See Also
Vendor
The USB vendor ID of the joystick, if available.
This can be used before any joysticks are opened. If the vendor ID isn't available this property returns 0.
property Vendor: Word read GetVendor
Type: Word
See Also
Operator Descriptions
Equal(TSdlJoystickID, TSdlJoystickID)
Used to compare against another TSdlJoystickID.
class operator Equal(const ALeft, ARight: TSdlJoystickID): Boolean; inline; static
Parameters
ALeft
: TSdlJoystickID
ARight
: TSdlJoystickID
Returns
Boolean
Equal(TSdlJoystickID, Cardinal)
Used to compare against 0
.
class operator Equal(const ALeft: TSdlJoystickID; const ARight: Cardinal): Boolean; inline; static
Parameters
ALeft
: TSdlJoystickID
ARight
: Cardinal
Returns
Boolean
Implicit(Cardinal)
Used to set the value to 0
.
class operator Implicit(const AValue: Cardinal): TSdlJoystickID; inline; static
Parameters
AValue
: Cardinal
Returns
NotEqual(TSdlJoystickID, TSdlJoystickID)
Used to compare against another TSdlJoystickID.
class operator NotEqual(const ALeft, ARight: TSdlJoystickID): Boolean; inline; static
Parameters
ALeft
: TSdlJoystickID
ARight
: TSdlJoystickID
Returns
Boolean
NotEqual(TSdlJoystickID, Cardinal)
Used to compare against 0
.
class operator NotEqual(const ALeft: TSdlJoystickID; const ARight: Cardinal): Boolean; inline; static
Parameters
ALeft
: TSdlJoystickID
ARight
: Cardinal
Returns
Boolean