Peripheral operations to handle control about.
Peripheral parts in interface:
Copy this to your project and extend with your parts or leave functions complete away where not used or supported.
◆ GetCapabilities()
Get the list of features that this add-on provides.
Called by the frontend to query the add-on's capabilities and supported peripherals. All capabilities that the add-on supports should be set to true.
- Parameters
-
[out] | capabilities | The add-on's capabilities |
The following table contains values that can be set with class PeripheralCapabilities :
Example:
{
}
Definition PeripheralUtils.h:133
void SetProvidesButtonmaps(bool providesButtonmaps)
Set true if the add-on provides button maps.
Definition PeripheralUtils.h:194
void SetProvidesJoysticks(bool providesJoysticks)
Set true if the add-on provides joysticks.
Definition PeripheralUtils.h:167
◆ PerformDeviceScan()
Perform a scan for joysticks.
The frontend calls this when a hardware change is detected. If an add-on detects a hardware change, it can trigger this function using the TriggerScan() callback.
- Parameters
-
[in] | scan_results | Assigned to allocated memory |
- Returns
- PERIPHERAL_NO_ERROR if successful
The following table contains values that can be set with class Peripheral :
Further are following included:
◆ GetEvents()
Get all events that have occurred since the last call to GetEvents().
- Parameters
-
[out] | events | List of available events within addon |
- Returns
- PERIPHERAL_NO_ERROR if successful
The following table contains values that can be set with class PeripheralEvent :
Further are several class constructors with values included.
◆ SendEvent()
Send an input event to the peripheral.
- Parameters
-
- Returns
- true if the event was handled, false otherwise