KallistiOS git master
Independent SDK for the Sega Dreamcast
|
API for determining controller types More...
Topics | |
Types | |
Preconfigured capabilities for standard controllers | |
Functions | |
int | cont_is_type (const struct maple_device *cont, uint32_t type) |
Check for controller type. | |
API for determining controller types
The following API is for detecting between different types of standard controllers. These controllers are not identified by specific model but are instead identified solely by capabilities, so that homebrew software can remain generic and future-proof to later homebrew controllers or exotic, untested 3rd party peripherals.
int cont_is_type | ( | const struct maple_device * | cont, |
uint32_t | type ) |
Check for controller type.
Checks whether or not a controller has the exact capabilities associated with the given type.
cont | Pointer to a Maple device structure which implements the CONTROLLER function. |
type | Type identifier or capability mask the controller is expected to match |
1 | The controller matches the given type. |
0 | The controller doesn't match the given type. |
-1 | Invalid controller. |