#include <revolution/wpad.h>
#define WPAD_CHAN0 0
#define WPAD_CHAN1 1
#define WPAD_CHAN2 2
#define WPAD_CHAN3 3
#define WPAD_STICK_CLAMP_OCTA_WITH_PLAY 0
#define WPAD_STICK_CLAMP_OCTA_WITHOUT_PLAY 1
#define WPAD_STICK_CLAMP_CIRCLE_WITH_PLAY 2
#define WPAD_STICK_CLAMP_CIRCLE_WITHOUT_PLAY 3
void WPADClampStick( s32 chan, void *status, u32 type );
chan |
One of the WPAD_CHAN*. |
status |
Pointer to the WPADStatus structure to be clamped. If the err member stores WPAD_ERR_NONE, the analog stick input value is clamped according to the algorithm below. |
type |
One of the WPAD_STICK_CLAMP_*. |
None.
This API clamps the input of the analog stick of a Nunchuk or a Classic Controller.
The algorithm for clamping the analog stick can be specified using type as shown in the figure below. If WPAD_STICK_CLAMP_OCTA_WITH_PLAY or WPAD_STICK_CIRCLE_WITH_PLAY are specified, the dead zone for the analog stick is clamped and the outside of an octagonal or circular shape is clamped. If WPAD_STICK_CLAMP_OCTA_WITHOUT_PLAY or WPAD_STICK_CIRCLE_WITHOUT_PLAY are specified, only the outside of the octagonal or circular shape is clamped without clamping the dead zone. More accurate movement in the diagonal direction that straddles each axis can be obtained when the dead zone is not clamped.








WPAD Functions
WPADFSStatus, WPADCLStatus
2006/08/15 Changed the API, added circular clamping and added diagrams.
2006/06/19 Changed the name of the External Extension Controller, deleted a description related to standard Nintendo GameCube controllers from the text, and deleted parts related to the sub-stick from the figure.
2005/11/10 Initial version.
CONFIDENTIAL