KallistiOS git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches
Querying Capabilities

API used to query for a controller's capabilities More...

Topics

 Capabilities
 Bit masks used to identify controller capabilities
 
 Capability Groups
 Bit masks representing common groups of capabilities
 

Functions

int cont_has_capabilities (const struct maple_device *cont, uint32_t capabilities)
 Check for controller capabilities.
 

Detailed Description

API used to query for a controller's capabilities

The following API is used to query for the support of individual or groups of capabilities by a particular device.

Function Documentation

◆ cont_has_capabilities()

int cont_has_capabilities ( const struct maple_device * cont,
uint32_t capabilities )

Check for controller capabilities.

Checks whether or not a controller implements the capabilities associated with the given type.

Note
Controller capability reporting is an extremely generic mechanism, such that many peripherals may implement the same capability in completely different ways. For example, the Samba De Amigo maraca controller will advertise itself as a dual-analog device, with each maraca being an analog stick.
Parameters
contPointer to a Maple device structure which implements the CONTROLLER function.
capabilitiesCapability mask the controller is expected to implement
Return values
1The controller supports the given capabilities.
0The controller doesn't support the given capabilities.
-1Invalid controller.
See also
cont_is_type