these bugs appear because these menus are not designed for 6.20.
so lets all create a menu that will be compatible with tn hen -d perm.
here is the source code of the menu:
- Code: Select all
#include <pspkernel.h>
#include <pspcallbacks.h>
#include <pspctrl.h>
#include <graphics.h>
#include <pspdebug.h>
#define RGB(r, g, b) ((r)|((g)<<8)|((b)<<16))
#define printf pspDebugScreenPrintf
PSP_MODULE_INFO("Menu Example",0,1,1);
//colors used later
Color green = RGB(0,255,0), red = RGB(255,0,0), black = RGB(0,0,0), blue = RGB (0,0,255);
char menuItems[10][25] = {
{"USB"},
{"RECOVERY"},
{"F0 BACKUP"},
{"F1 BACKUP"},
{"CPU GAME"},
{"CPU XMB"},
{"PLUGINS"},
{"FAKE REGION"},
{"RESET DEVICE"},
{"RESET VSH"},
};
int timer,select,foo;
SceCtrlData pad;
int main() {
pspDebugScreenInit();
pspDebugScreenClear();
initGraphics();
SetupCallbacks();
while(1) {
sceCtrlReadBufferPositive(&pad,1);
fillScreenRect(black,0,0,480,272);
timer++;
for(foo=0;foo<10;foo++) {
printTextScreen(200,foo*10+70,menuItems[foo],red);
}
printTextScreen(200,select*10+70,menuItems[select],green);
if((pad.Buttons & PSP_CTRL_UP) && (timer > 10) && (select > 0)) {
select--;
timer = 0;
} else if ((pad.Buttons & PSP_CTRL_DOWN) && (timer > 10) && (select < 9)) {
select++;
timer = 0;
}
flipScreen();
}
return 0;
}
i will edit the code so that this menu becomes perfect.
i would also like you to make suggestions on how to improve it!!!
thnx

