Skip to content

Commit

Permalink
Fixed bug 2840 - Wrong colors in TGA files from GTA2
Browse files Browse the repository at this point in the history
Amit Jain

Swapping of bits happened for SDL_LIL_ENDIAN system which is wrong. It should be for SDL_BIG_ENDIAN system.
  • Loading branch information
slouken committed Sep 12, 2017
1 parent 84bff81 commit 50557c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion IMG_tga.c
Expand Up @@ -301,7 +301,7 @@ SDL_Surface *IMG_LoadTGA_RW(SDL_RWops *src)
} else {
SDL_RWread(src, dst, w * bpp, 1);
}
#if SDL_BYTEORDER == SDL_LIL_ENDIAN
#if SDL_BYTEORDER == SDL_BIG_ENDIAN
if (bpp == 2) {
/* swap byte order */
int x;
Expand Down

0 comments on commit 50557c1

Please sign in to comment.