#include <revolution/wpad.h>
#define WPAD_CHAN0 0
#define WPAD_CHAN1 1
#define WPAD_CHAN2 2
#define WPAD_CHAN3 3
#define WPAD_ERR_NONE 0
#define WPAD_ERR_NO_CONTROLLER -1
#define WPAD_ERR_BUSY -2
#define WPAD_ERR_TRANSFER -3
typedef void (* WPADConnectCallback )( s32 chan, s32 reason );
WPADConnectCallback WPADSetConnectCallback( s32 chan, WPADConnectCallback callback );
chan |
One of WPAD_CHANn values. |
callback |
The callback function that notifies whether the Wii Remote for the specified channel was connected or disconnected. |
Pointer to the most recently registered callback function.
Registers the callback function that notifies whether the Wii Remote for the specified channel was connected or disconnected. If NULL is specified, no notifications are made until reset.
When the Wii Remote is connected, WPAD_ERR_NONE is passed as the result argument that is passed to the callback function; at disconnection, WPAD_ERR_NO_CONTROLLER is passed.
The callback functions registered with this function are not cleared when controllers are connected, disconnected or when an external controller is inserted or removed.
06/19/2006 Initial version.