#include <cafe/vpad.h>

void VPADDisableStickCrossClamp( s32 chan );


chan Controller number. 0 for DRC1 and 1 for DRC2.

Return Values



For the DRC analog stick, switches the clamp processing method to circular clamping. Circular clamping is used by default.

Clamps the inner and outer edges in a circle.

Given min and max as the minimum and maximum clamping values set by the VPADSetLStickClampThreshold or VPADSetRStickClampThreshold function, the clamped coordinates (x', y') are obtained as follows according to the distance d from the origin to the Circle Pad input coordinates (x, y).

If d <= min, (x', y') is equal to (0, 0).

If min < d < max, (x', y') is equal to (d - min) / d * (x, y).

If d >= max, (x', y') is equal to (max - min) / d * (x, y).

Finally, (x', y') is normalized by max-min to floating-point values between -1.0f and 1.0f.

Call the VPADEnableStickCrossClamp function to change to crosshair clamping.

Do Not Call From

Background Do not call this function from the background.
Multiple threads This function is not thread-safe.
Multiple Cores Do not call this function from more than one Core.

See Also


Revision History

2013/05/16 Added the description of Circle clamp.
2013/05/08 Automated cleanup pass.
2011/04/15 Added argument.
2011/03/30 Initial version.