TGamolfCustomJoystickService Class

Platform service to access to joystick/gamepad controllers on a computer

Unit: Gamolf.RTL.Joystick
TInterfacedObject
  Gamolf.RTL.Joystick.TGamolfCustomJoystickService
    Gamolf.RTL.Joystick.DirectInput.Win.TGamolfJoystickWinDirectInputService
type TGamolfCustomJoystickService = class(TInterfacedObject)

The TGamolfCustomJoystickService type exposes the following members.

Show:
 NameDescription
Create

Destroy

Top
Show:
 NameDescription
Count

Return the number of joysticks managed by the system

ForEach

Overloaded. Loop on all game controllers and call the method with infos for each one

ForEach

Overloaded. Loop on all game controllers and call the procedure with infos for each one

ForEachConnectedDevice

Overloaded. Loop on all game controllers and call the method with infos for each connected device

ForEachConnectedDevice

Overloaded. Loop on all game controllers and call the procedure with infos for each connected device

StartDiscovery

Scan for availale devices (if some are already used, their ID could change)

getDPad

Return the DPad value between (0-359° or 65535) Compare it to Top, TopRight/RightTop, Right, BottomRight/RightBottom, Bottom, BottomLeft/LeftBottom, Left, LeftTop/TopLeft, Center values from TJoystickDPad enumeration

getDPadFromXY

Get orientation (like DPad) from (x,y) axis

getInfo

Return a TJoystick for the JoystickID controller

getX

Return X axes values for JoystickID controller

getXY

Return X,Y axes values for JoystickID controller

getXYFromDPad

Get the values for (x,y) axis from a DPad/POV orientation

getY

Return Y axes values for JoystickID controller

getZ

Return Z axes values for JoystickID controller

hasDPad

Check if the game controller has a DPad/POV button

hasJoystickButtonsAPI

Override this function and return true for platforms where buttons place are known. By default, it's false;

initJoystick

Reset Joystick structure

isConnected

Return "true" if the JoystickID controller is connected and available

isDPad

Overloaded.

isDPad

Overloaded.

isDPad

Overloaded.

isDPad

Overloaded. Check is the DPad / POV is in a standard position for a JoystickID or in general

isPressed

Check if button "ButtonID" from controller "JoystickID" is pressed or not

Top