Skip to content

TSdlGamepadID

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

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

Definition

Unit: Neslib.Sdl3.Input

type TSdlGamepadID = record ... end;

Properties

Name Description
Guid The implementation-dependent GUID of the gamepad.
Kind The type of the gamepad.
Mapping The mapping of the gamepad, or an empty string if not available.
Name The implementation dependent name of the gamepad, or an empty string if not available.
Path The implementation dependent path of the gamepad, or an empty string if not available. This can be used before any gamepads are opened.
PlayerIndex The player index of the gamepad, or -1 if not available.
Product The USB product ID of the gamepad, if available.
ProductVersion The product version of the gamepad, if available.
RealKind The type of the gamepad, ignoring any mapping override.
Vendor The USB vendor ID of the gamepad, if available.

Operators

Name Description
Equal(TSdlGamepadID, TSdlGamepadID) Used to compare against another TSdlGamepadID.
Equal(TSdlGamepadID, Cardinal) Used to compare against 0.
Implicit Used to set the value to 0.
NotEqual(TSdlGamepadID, TSdlGamepadID) Used to compare against another TSdlGamepadID.
NotEqual(TSdlGamepadID, Cardinal) Used to compare against 0.

Property Descriptions

Guid

The implementation-dependent GUID of the gamepad.

This can be used before any gamepads are opened.

property Guid: TGuid read GetGuid

Type: TGuid

See Also


Kind

The type of the gamepad.

This can be used before any gamepads are opened.

property Kind: TSdlGamepadKind read GetKind

Type: TSdlGamepadKind

See Also


Mapping

The mapping of the gamepad, or an empty string if not available.

This can be used before any gamepads are opened.

property Mapping: String read GetMapping

Type: String

See Also


Name

The implementation dependent name of the gamepad, or an empty string if not available.

This can be used before any gamepads are opened.

property Name: String read GetName

Type: String

See Also


Path

The implementation dependent path of the gamepad, or an empty string if not available. This can be used before any gamepads are opened.

property Path: String read GetPath

Type: String

See Also


PlayerIndex

The player index of the gamepad, or -1 if not available.

This can be used before any gamepads are opened.

property PlayerIndex: Integer read GetPlayerIndex

Type: Integer

See Also


Product

The USB product ID of the gamepad, if available.

This can be used before any gamepads 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 gamepad, if available.

This can be used before any gamepads are opened. If the product version isn't available this property returns 0.

property ProductVersion: Word read GetProductVersion

Type: Word

See Also


RealKind

The type of the gamepad, ignoring any mapping override.

This can be used before any gamepads are opened.

property RealKind: TSdlGamepadKind read GetRealKind

Type: TSdlGamepadKind

See Also


Vendor

The USB vendor ID of the gamepad, if available.

This can be used before any gamepads 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(TSdlGamepadID, TSdlGamepadID)

Used to compare against another TSdlGamepadID.

class operator Equal(const ALeft, ARight: TSdlGamepadID): Boolean; inline; static

Parameters

ALeft: TSdlGamepadID

ARight: TSdlGamepadID

Returns

Boolean


Equal(TSdlGamepadID, Cardinal)

Used to compare against 0.

class operator Equal(const ALeft: TSdlGamepadID; const ARight: Cardinal): Boolean; inline; static

Parameters

ALeft: TSdlGamepadID

ARight: Cardinal

Returns

Boolean


Implicit(Cardinal)

Used to set the value to 0.

class operator Implicit(const AValue: Cardinal): TSdlGamepadID; inline; static

Parameters

AValue: Cardinal

Returns

TSdlGamepadID


NotEqual(TSdlGamepadID, TSdlGamepadID)

Used to compare against another TSdlGamepadID.

class operator NotEqual(const ALeft, ARight: TSdlGamepadID): Boolean; inline; static

Parameters

ALeft: TSdlGamepadID

ARight: TSdlGamepadID

Returns

Boolean


NotEqual(TSdlGamepadID, Cardinal)

Used to compare against 0.

class operator NotEqual(const ALeft: TSdlGamepadID; const ARight: Cardinal): Boolean; inline; static

Parameters

ALeft: TSdlGamepadID

ARight: Cardinal

Returns

Boolean