summaryrefslogtreecommitdiff
path: root/uisimulator
diff options
context:
space:
mode:
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;
82static unsigned int rounded_width; 82static unsigned int rounded_width;
83#endif 83#endif
84 84
85#ifdef LITTLE_ENDIAN
86#define readshort(x) x
87#define readlong(x) x
88#else
89
85#define readshort(x) (((x&0xff00)>>8)|((x&0x00ff)<<8)) 90#define readshort(x) (((x&0xff00)>>8)|((x&0x00ff)<<8))
86#define readlong(x) (((x&0xff000000)>>24)| \ 91#define readlong(x) (((x&0xff000000)>>24)| \
87 ((x&0x00ff0000)>>8) | \ 92 ((x&0x00ff0000)>>8) | \
88 ((x&0x0000ff00)<<8) | \ 93 ((x&0x0000ff00)<<8) | \
89 ((x&0x000000ff)<<24)) 94 ((x&0x000000ff)<<24))
90 95#endif
91 96
92/********************************************************************* 97/*********************************************************************
93 * read_bmp_file() 98 * read_bmp_file()