summaryrefslogtreecommitdiffstats
path: root/uisimulator
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2002-05-16 13:03:21 +0000
committerDaniel Stenberg <daniel@haxx.se>2002-05-16 13:03:21 +0000
commit4a615c7885ff50a2b49d323ac7ae560ede95d970 (patch)
tree9b3d9e882e593807ca0856a45f4e6f86e671b9e9 /uisimulator
parenta78d6820174fa1af59a71b816e6b3dbe55e94b65 (diff)
downloadrockbox-4a615c7885ff50a2b49d323ac7ae560ede95d970.tar.gz
rockbox-4a615c7885ff50a2b49d323ac7ae560ede95d970.zip
support little endian too
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@593 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator')
-rw-r--r--uisimulator/bmp.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/uisimulator/bmp.c b/uisimulator/bmp.c
index 85a0fd2ffe..828f855295 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()