Unit HIDJOYSTICK
Return to Unit Reference
Contents
[hide]Description
Ultibo HID Joystick and Gamepad Consumer unit
This is a consumer for any generic HID joystick or gamepad device, it accepts HID application collections in the generic desktop page (HID_PAGE_GENERIC_DESKTOP) with the usage set to joystick (HID_DESKTOP_JOYSTICK) or gamepad (HID_DESKTOP_GAMEPAD).
The consumer will bind to any joystick or gamepad collection that implements at a minimum the X and Y axis and at least one button.
This consumer doesn't support certain well known gamepad devices such as the Xbox or PlayStation controllers that have specific control and button mappings and may require special command sequences to enable certain features. The option to create an additional driver that has specific support for some of those devices is being considered.
Constants
HID_JOYSTICK_*
Type definitions
HID joystick device
Public variables
None defined
Function declarations
Initialization functions
procedure HIDJoystickInit;
HID joystick functions
function HIDJoystickStart(Joystick:PJoystickDevice):LongWord;
function HIDJoystickStop(Joystick:PJoystickDevice):LongWord;
function HIDJoystickUpdate(Joystick:PJoystickDevice):LongWord;
HID joystick helper functions
function HIDJoystickCheckCollection(Collection:PHIDCollection):LongWord;
function HIDJoystickCheckDefinition(Definition:PHIDDefinition):LongWord;
Return to Unit Reference