#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.
The hardware specifications for the analog stick give a guaranteed play value of +/- 15.








2008/03/17 Added the guaranteed hardware play value.
2006/08/15 Changed the API. Added circular clamping and figures.
2006/06/19 Renamed the external extension controllers, deleted descriptions related to the standard GameCube controller, and removed portions specific to the C Stick from the figures.
2005/11/10 Initial version.
CONFIDENTIAL