#include <revolution/kpadOld.h> void KPADSetBtnRepeat( s32 chan, f32 delay_sec, f32 pulse_sec );
| chan | One of the WPAD_CHANn values. |
|---|---|
| delay_sec | Specifies the time for holding down the button before the KPAD_BUTTON_RPT flag gets set. The units are seconds. |
| pulse_sec | If the KPAD_BUTTON_RPT flag is enabled delay_sec seconds after a button is pressed and held down, pulse_sec will specify the time interval (in seconds) at which the KPAD_BUTTON_RPT flag should be enabled thereafter. The units are seconds. If you do not want this flag enabled at all, set pulse_sec to 0. |
None.
Sets the repeat feature of the digital button (described in the KPADStatus structure). When a button is pressed and held, the KPAD_BUTTON_RPT flag can be periodically enabled in the hold member variable of KPADStatus. delay_sec seconds after a button is pressed, the KPAD_BUTTON_RPT flag gets set every pulse_sec seconds. In the example shown below, a program is created (using the flags) to perform an action periodically when a button is pressed and held down.
if ( (hold & (KPAD_BUTTON_RPT | KPAD_BUTTON_A) ) == (KPAD_BUTTON_RPT | KPAD_BUTTON_A) ) {Your routine}
Note that repeat settings are not maintained for each button. In this example, if another button is pressed while the A Button is held, the repeat status will be completely reset.
None.
2006/10/25 Changed the name to KPADOld library, beginning with Revolution SDK 2.3.
2006/03/01 Initial version.
CONFIDENTIAL