forked from len0rd/rockbox
support little endian too
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@593 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
a78d682017
commit
4a615c7885
1 changed files with 6 additions and 1 deletions
|
|
@ -82,12 +82,17 @@ static unsigned int compressed_size;
|
|||
static unsigned int rounded_width;
|
||||
#endif
|
||||
|
||||
#ifdef LITTLE_ENDIAN
|
||||
#define readshort(x) x
|
||||
#define readlong(x) x
|
||||
#else
|
||||
|
||||
#define readshort(x) (((x&0xff00)>>8)|((x&0x00ff)<<8))
|
||||
#define readlong(x) (((x&0xff000000)>>24)| \
|
||||
((x&0x00ff0000)>>8) | \
|
||||
((x&0x0000ff00)<<8) | \
|
||||
((x&0x000000ff)<<24))
|
||||
|
||||
#endif
|
||||
|
||||
/*********************************************************************
|
||||
* read_bmp_file()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue