mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-22 09:39:43 +01:00
Fix loading of PNG resources on big-endian machines
LodePNG always loads PNG in big-endian RGBA format. For this reason, when loading PNG files VVVVVV was specifying the format as ABGR and the conversion would then be performed by SDL. However, then running on big-endian machines, this conversion should not be performed at all, and the surface format should then be set to RGBA.
This commit is contained in:
parent
32e6ab6ecd
commit
b5abc3956c
1 changed files with 4 additions and 0 deletions
|
@ -65,7 +65,11 @@ static SDL_Surface* LoadImageRaw(const char* filename, unsigned char** data)
|
|||
height,
|
||||
32,
|
||||
width * 4,
|
||||
#if SDL_BYTEORDER == SDL_BIG_ENDIAN
|
||||
SDL_PIXELFORMAT_RGBA8888
|
||||
#else
|
||||
SDL_PIXELFORMAT_ABGR8888
|
||||
#endif
|
||||
);
|
||||
|
||||
return loadedImage;
|
||||
|
|
Loading…
Reference in a new issue