Skip to content
Permalink
Browse files

Fixed bug 2840 - Wrong colors in TGA files from GTA2

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 50557c15538611130360b17ed8b48472a32df136
Showing with 1 addition and 1 deletion.
  1. +1 −1 IMG_tga.c
@@ -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;

0 comments on commit 50557c1

Please sign in to comment.