void GameLoop() {
while(1) {
if (GameMainMenu() == 9) {break;}
else {
//result = GameMain();
if (GameMain() == 1) {
if (bClearThemes == FALSE) {
UnloadGameGraphics();
bClearThemes = TRUE;
}
GameOver();
} // runs the game
else {
sceGuTerm();
sceKernelExitGame();
}
}
}
return;
}
the first time we enter the loop all is well. When i return from the mainmenu the game starts. When i'm gameover or exit the game i go to the gameover screen. when i leave the gameover screen i go to the mainmenu again. This mainmenu renders correctly and all menuitems work without error. except for the exit game button whichs should exit to the xmb but now goes to the gameoverscreen. The new game also goes directly to the gameover screen. At the very first line of code in the newgame i let the psp pause until i press the X button. This works the first time i run the new game however when return to the mainmenu after that it just goes directly to the gameover screen without going to the gamemain function :S
any idea what is causing this? any ideas and suggestions are appreciated even if someone is not sure.