X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=common%2Fmenu.c;h=bb595106cbc9f446290a12258c0cc2904b32dccc;hb=703e4c7bbb2cfd549797e2092e4d863547b3e87c;hp=b6bd019c3520becad5279154e58f0510689198c6;hpb=2951214ea65ce2e2ac40671511b8d5a9ea2d2842;p=libpicofe.git diff --git a/common/menu.c b/common/menu.c index b6bd019..bb59510 100644 --- a/common/menu.c +++ b/common/menu.c @@ -164,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; }