main.cpp
bool WaitForButtonTimeout(SceCtrlData *pad, int Timeout)
{
	for(; Timeout > 0; Timeout--)
	{
		sceDisplayWaitVblankStart();
		sceCtrlReadBufferPositive(pad, 1);
		if((pad->Buttons & ALL_USER_BUTTONS)
		|| (pad->Lx < (128 - AnalogDeadZone))
		|| (pad->Lx > (128 + AnalogDeadZone))
		|| (pad->Ly < (128 - AnalogDeadZone))
		|| (pad->Ly > (128 + AnalogDeadZone))) return true;
	}
	return false;
}
/* Waits for a button to be pressed, up to the specified number of frames.
 * Inputs:
 * -pad: Button status to fill in when pressed.
 * -Timeout: Number of frames to wait.
 * Returns: true if a button was pressed, false if timeout expired.
 */
Waits for a button to be pressed, up to the specified number of frames.
Inputs:
-pad: Button status to fill in when pressed.
-Timeout: Number of frames to wait.
Returns: true if a button was pressed, false if timeout expired.
Waits for a button to be pressed up to the specified number of frames . Inputs : - pad : Button status to fill in when pressed . - Timeout : Number of frames to wait . Returns : true if a button was pressed false if timeout expired .
bool WaitForButtonTimeout(SceCtrlData *pad, int Timeout)
{
	for(; Timeout > 0; Timeout--)
	{
		sceDisplayWaitVblankStart();
		sceCtrlReadBufferPositive(pad, 1);
		if((pad->Buttons & ALL_USER_BUTTONS)
		|| (pad->Lx < (128 - AnalogDeadZone))
		|| (pad->Lx > (128 + AnalogDeadZone))
		|| (pad->Ly < (128 - AnalogDeadZone))
		|| (pad->Ly > (128 + AnalogDeadZone))) return true;
	}
	return false;
}
bool WaitForButtonTimeout ( SceCtrlData * pad , int Timeout ) { for ( ; Timeout > 0 ; Timeout -- ) { sceDisplayWaitVblankStart ( ) ; sceCtrlReadBufferPositive ( pad , 1 ) ; if ( ( pad -> Buttons & ALL_USER_BUTTONS ) || ( pad -> Lx < ( 128 - AnalogDeadZone ) ) || ( pad -> Lx > ( 128 + AnalogDeadZone ) ) || ( pad -> Ly < ( 128 - AnalogDeadZone ) ) || ( pad -> Ly > ( 128 + AnalogDeadZone ) ) ) return true ; } return false ; }
Waits for a button to be pressed, up to the specified number of frames.
Waits for a button to be pressed up to the specified number of frames .