I made defines in my code, which use the numbers provided by the readme.psp file.
In my main loop, I have the following code to check for Up (6), Down (8) and X (2):
Code: Select all
while( SDL_PollEvent(&theSDLEvent) )
{
if( theSDLEvent.type == SDL_QUIT )
{
bContinue = false;
}
else if( theSDLEvent.type == SDL_JOYBUTTONDOWN )
{
if( theSDLEvent.type == PSP_CTRL_UP )
{
theSDLGraphics.SetActiveItem( theSDLGraphics.GetActiveItem() - 1 );
}
else if( theSDLEvent.type == PSP_CTRL_DOWN )
{
theSDLGraphics.SetActiveItem( theSDLGraphics.GetActiveItem() + 1 );
}
else if( theSDLEvent.type == PSP_CTRL_CROSS )
{
Mix_PlayChannel(0, mixSounds[0], -1);
if( theSDLGraphics.GetActiveItem() == 3 )
{
bContinue = false;
}
}
}
}
Unfortunately, it doesn't do anything :(
Does anyone see what I'm doing wrong?