|
KallistiOS git master
Independent SDK for the Sega Dreamcast
|
Controller Maple Device API More...
Topics | |
| Querying Capabilities | |
| API used to query for a controller's capabilities | |
| Querying Inputs | |
| API used to query for input state | |
| Querying Types | |
| API for determining controller types | |
Files | |
| file | controller.h |
| Definitions for using the controller device. | |
Controller Maple Device API
This module contains the public API for the controller maple driver.
A standard, first-party Dreamcast controller has the following button configuration:
___________
/ | __ | \
L trigger ------| / | | | | \ |----- R trigger
_|__/ | |__| | \_|__
| _ \____/ |
Joystick ----|-/ \ (Y) |
| \_/ (X) (B)|
| _ (A) |
| _| |_ |
D-Pad ----|-|_ _| |
| |_| /\ |
\ /__\ /
\ _____|_______ /
\ / | \ /
\/ | \/
Start button
You can grab a pointer to a connected controller by using the following:
maple_device_t *device = maple_enum_type(N, MAPLE_FUNC_CONTROLLER);
if(device) printf("Controller found!\n");
else printf("Controller not found!\n");
where N is the controller number. 0 would be the first controller found, which may not necessarily be on port A.