Skip to content

Commit

Permalink
Corrected default palette generation.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Feb 19, 2019
1 parent 54c81e1 commit 9434f1b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/SDL12_compat.c
Expand Up @@ -1935,9 +1935,9 @@ SDL_SetVideoMode(int width, int height, int bpp, Uint32 flags12)
int i;
SDL_Color *color = VideoSurface12->format->palette->colors;
for (i = 0; i < 256; i++, color++) {
{ const int x = i & 0xe0; color->r = x >> 3 | x >> 6; }
{ const int x = (i << 3) & 0xe0; color->g = x >> 3 | x >> 6; }
{ const int x = (i & 0x3) | (i & 0x3 << 2); color->b = x | x << 4; }
{ const int x = i & 0xe0; color->r = x | x >> 3 | x >> 6; }
{ const int x = (i << 3) & 0xe0; color->g = x | x >> 3 | x >> 6; }
{ const int x = (i & 0x3) | ((i & 0x3) << 2); color->b = x | x << 4; }
color->a = 255;
}
}
Expand Down

0 comments on commit 9434f1b

Please sign in to comment.