PADSetAnalogMode

Syntax

#include <revolution/pad.h>

#define PAD_MODE_0              0
#define PAD_MODE_1              1
#define PAD_MODE_2              2
#define PAD_MODE_3              3
#define PAD_MODE_4              4
#define PAD_MODE_5              5
#define PAD_MODE_6              6
#define PAD_MODE_7              7

void PADSetAnalogMode(u32 mode);

Arguments

mode one of PAD_MODE_*

Return Values

None.

Description

There is no need to use this function.

Specifies the analog mode of the controllers to use. The analog mode controls the resolution of the controller's analog inputs as stored in PADStatus (see modes below). The default mode is PAD_MODE_3.

Note: The PADSetAnalogMode function suspends hardware controller sampling. The next PADRead function call returns PAD_ERR_NO_CONTROLLER errors for the attached controllers. The specified analog mode takes effect after the next call to the PADReset or PADInit function. Note that the PADSetAnalogMode function can be called before the PADInit function.

Note:GameCube standard controllers do not support analog input values (AnalogA/B) for A or B Buttons. Also, the Revolution SDK controller library (WPAD) does not support analog input values from the A and B Buttons.

Mode 0, 5, 6, 7:

stickX, stickY All 8 bits are valid.
substickX, substickY All 8 bits are valid.
triggerLeft, triggerRight Uppermost 4 bits are valid. Other bits are set to zero.
analogA, analogB Uppermost 4 bits are valid. Other bits are set to zero.

Mode 1:

stickX, stickY All 8 bits are valid.
substickX, substickY Uppermost 4 bits are valid. Other bits are set to zero.
triggerLeft, triggerRight All 8 bits are valid.
analogA, analogB Uppermost 4 bits are valid. Other bits are set to zero.

Mode 2:

stickX, stickY All 8 bits are valid.
substickX, substickY Uppermost 4 bits are valid. Other bits are set to zero.
triggerLeft, triggerRight Uppermost 4 bits are valid. Other bits are set to zero.
analogA, analogB All 8 bits are valid.

Mode 3:

stickX, stickY All 8 bits are valid.
substickX, substickY All 8 bits are valid.
triggerLeft, triggerRight All 8 bits are valid.
analogA, analogB All 8 bits are invalid and set to zero.

Mode 4:

stickX, stickY All 8 bits are valid.
substickX, substickY All 8 bits are valid.
triggerLeft, triggerRight All 8 bits are invalid and set to zero.
analogA, analogB All 8 bits are valid.

See Also

PADClamp, PADInit, PADReset, PADStatus

Revision History

2006/03/01 Initial version.


CONFIDENTIAL