diff options
| author | Daniel Stenberg <daniel@haxx.se> | 2002-05-16 13:03:21 +0000 |
|---|---|---|
| committer | Daniel Stenberg <daniel@haxx.se> | 2002-05-16 13:03:21 +0000 |
| commit | 4a615c7885ff50a2b49d323ac7ae560ede95d970 (patch) | |
| tree | 9b3d9e882e593807ca0856a45f4e6f86e671b9e9 | |
| parent | a78d6820174fa1af59a71b816e6b3dbe55e94b65 (diff) | |
| download | rockbox-4a615c7885ff50a2b49d323ac7ae560ede95d970.zip rockbox-4a615c7885ff50a2b49d323ac7ae560ede95d970.tar.gz rockbox-4a615c7885ff50a2b49d323ac7ae560ede95d970.tar.bz2 rockbox-4a615c7885ff50a2b49d323ac7ae560ede95d970.tar.xz | |
support little endian too
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@593 a1c6a512-1295-4272-9138-f99709370657
| -rw-r--r-- | uisimulator/bmp.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/uisimulator/bmp.c b/uisimulator/bmp.c index 85a0fd2..828f855 100644 --- a/uisimulator/bmp.c +++ b/uisimulator/bmp.c @@ -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() |