Code: Select all
sceCtrlPeekBufferPositive(&paddata, 1);
if(paddata.Buttons & PSP_CTRL_blah & PSP_CTRL_blah2)
{
...
}
Code: Select all
sceCtrlPeekBufferPositive(&paddata, 1);
if(paddata.Buttons & PSP_CTRL_blah & PSP_CTRL_blah2)
{
...
}
Code: Select all
if (pad.Buttons & PSP_CTRL_UP && pad.Buttons & PSP_CTRL_TRIANGLE)
Code: Select all
u32 uWantedKeys;
uWantedKeys = PSP_CTRL_UP | PSP_CTRL_TRIANGLE; //As many other as you want
if( (pad.Buttons & uWantedKeys) == uWantedKeys )
// Do whatever
Code: Select all
u32 uWantedKeys;
uWantedKeys = PSP_CTRL_UP;
uWantedKeys |= PSP_CTRL_TRIANGLE;
//... As many other as you want
if( (pad.Buttons & uWantedKeys) == uWantedKeys )
// Do whatever
Aion wrote:OrCode: Select all
u32 uWantedKeys; uWantedKeys = PSP_CTRL_UP | PSP_CTRL_TRIANGLE; //As many other as you want if( (pad.Buttons & uWantedKeys) == uWantedKeys ) // Do whatever
Code: Select all
u32 uWantedKeys; uWantedKeys = PSP_CTRL_UP; uWantedKeys |= PSP_CTRL_TRIANGLE; //... As many other as you want if( (pad.Buttons & uWantedKeys) == uWantedKeys ) // Do whatever
Code: Select all
#define BOTH_UP_AND_TRIANGLE_PRESSED (PSP_CTRL_UP|PSP_CTRL_TRIANGLE)
if ((pad.Buttons & BOTH_UP_AND_TRIANGLE_PRESSED) == BOTH_UP_AND_TRIANGLE_PRESSED)
{
// do whatever you want when both UP and TRIANGLE are pressed
}
Code: Select all
typedef unsigned int u32;