#include <cafe/pads/wpad/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
|status||Pointer to the
|type||One of the
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_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_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 provide a guaranteed play value of ±15.
|Background||Do not call this function from the background.|
|Interrupt handler||Do not call this function from any interrupt handler.|
|Exception handler||Do not call this function from any exception handler.|
|Multiple Cores||Do not call this function from more than one Core.|
2013/05/08 Automated cleanup pass.
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.