psp port runs, bad colors

git-svn-id: file:///home/notaz/opt/svn/PicoDrive/platform@275 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
notaz 2007-10-15 20:50:37 +00:00
parent 2951214ea6
commit 703e4c7bbb
10 changed files with 744 additions and 67 deletions

View file

@ -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;
}