psp port runs, bad colors

git-svn-id: file:///home/notaz/opt/svn/PicoDrive@275 be3aeb3a-fb24-0410-a615-afba39da0efa
This commit is contained in:
notaz 2007-10-15 20:50:37 +00:00
parent 1820b5a7a1
commit 7d4906bfc9
11 changed files with 747 additions and 68 deletions

View file

@ -80,7 +80,11 @@ void readpng(void *dest, const char *fname, readpng_what what)
int len = width;
while (len--)
{
*dst++ = ((src[0]&0xf8)<<8) | ((src[1]&0xf8)<<3) | (src[2] >> 3);
#ifdef PSP
*dst++ = ((src[2]&0xf8)<<8) | ((src[1]&0xf8)<<3) | (src[0] >> 3); // BGR
#else
*dst++ = ((src[0]&0xf8)<<8) | ((src[1]&0xf8)<<3) | (src[2] >> 3); // RGB
#endif
src += 3;
}
dst += BG_WIDTH - width;