PADClampTrigger

Syntax

#include <revolution/pad.h>

#define PAD_TRIGGER_FIXED_BASE       0
#define PAD_TRIGGER_INDIVIDUAL_BASE  1

void PADClampTrigger( void *status, u32 type );

Arguments

status Pointer to the PADStatus structure to be clamped. If the err member stores PAD_ERR_NONE, the analog trigger input value is clamped according to the algorithm below.
type Either PAD_TRIGGER_FIXED_BASE or PAD_TRIGGER_INDIVIDUAL_BASE

Return Values

None.

Description

Clamps the analog trigger inputs of a standard Nintendo GameCube controller.

The algorithm for clamping the analog trigger can be specified using type as shown in the figure below.
If PAD_TRIGGER_FIXED_BASE is specified, trigger input is clamped to a lower limit of 30 and an upper limit of 180 just like the clamp algorithm used when the PADClamp function is called. If PAD_TRIGGER_INDIVIDUAL_BASE is specified, clamping is performed using the lower limit value for each controller unit as automatically obtained when the power is turned on or when PADRecalibrate is executed, and using an upper limit value equal to the lower limit value plus 180.

Joint use with the PADClamp function is not recommended since the PADClamp function also clamps the analog input trigger.

padclamptrigger1.gif

padclamptrigger2.gif

See Also

PADStatus

Revision History

2006/09/07 Initial version.


CONFIDENTIAL