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()