TGamolfJoystickWinDirectInputService Class

Definition

Delphi
type TGamolfJoystickWinDirectInputService = class(TGamolfCustomJoystickService)
Inheritance
TInterfacedObject
TGamolfJoystickWinDirectInputService

Constructors

Methods

Count

Return the number of joysticks managed by the system

ForEach(TJoystickInfo, TJoystickInfosCallbackEvent)

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

(Inherited from TGamolfCustomJoystickService)
ForEachConnectedDevice(TJoystickInfo, TJoystickInfosConnectedCallbackEvent, TJoystickErrorCallbackEvent)

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

(Inherited from TGamolfCustomJoystickService)
StartDiscovery

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

getDPad(Byte, Boolean)

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

(Inherited from TGamolfCustomJoystickService)
getDPadFromXY(Single, Single)

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

(Inherited from TGamolfCustomJoystickService)
getInfo(TJoystickID, TJoystickInfo)

Return a TJoystickInfo for the JoystickID controller

getX(Byte)

Return X axes values for JoystickID controller

(Inherited from TGamolfCustomJoystickService)
getXY(Byte, Single, Single)

Return X,Y axes values for JoystickID controller

(Inherited from TGamolfCustomJoystickService)
getXYFromDPad(Word, Single, Single)

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

(Inherited from TGamolfCustomJoystickService)
getY(Byte)

Return Y axes values for JoystickID controller

(Inherited from TGamolfCustomJoystickService)
getZ(Byte)

Return Z axes values for JoystickID controller

(Inherited from TGamolfCustomJoystickService)
hasDPad(TJoystickID)

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;

(Inherited from TGamolfCustomJoystickService)
initJoystick(TJoystickInfo)

Reset Joystick structure

(Inherited from TGamolfCustomJoystickService)
isConnected(TJoystickID)

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

isDPad(Word, array of TJoystickDPad) (Inherited from TGamolfCustomJoystickService)
isPressed(Byte, Byte)

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

(Inherited from TGamolfCustomJoystickService)

Fields