X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=platform%2Fcommon%2Fmenu.c;h=bb595106cbc9f446290a12258c0cc2904b32dccc;hb=7d4906bfc93ced40a544534f433f06b00add52b0;hp=d2957c2b7509304fd86b6a4ac4b93f8ab4fc29b4;hpb=ea8c405fa721a8658b1f7c51cf6238ba2bba8a17;p=picodrive.git diff --git a/platform/common/menu.c b/platform/common/menu.c index d2957c2..bb59510 100644 --- a/platform/common/menu.c +++ b/platform/common/menu.c @@ -22,6 +22,10 @@ #define SCREEN_WIDTH 321 #define SCREEN_BUFFER menu_screen extern unsigned char *menu_screen; +#elif defined(PSP) + #include "../psp/psp.h" + #define SCREEN_WIDTH 512 + #define SCREEN_BUFFER psp_screen #endif char menuErrorMsg[64] = { 0, }; @@ -160,7 +164,12 @@ static int parse_hex_color(char *buff) { char *endp = buff; int t = (int) strtoul(buff, &endp, 16); - if (endp != buff) return ((t>>8)&0xf800) | ((t>>5)&0x07e0) | ((t>>3)&0x1f); + if (endp != buff) +#ifdef PSP + return ((t<<8)&0xf800) | ((t>>5)&0x07e0) | ((t>>19)&0x1f); +#else + return ((t>>8)&0xf800) | ((t>>5)&0x07e0) | ((t>>3)&0x1f); +#endif return -1; } @@ -216,6 +225,7 @@ void menu_init(void) int tmp = parse_hex_color(buff+16); if (tmp >= 0) menu_sel_color = tmp; else lprintf("skin.txt: parse error for selection_color\n"); + lprintf("sel color: %04x\n", menu_sel_color); } else lprintf("skin.txt: parse error: %s\n", buff);