src/SDL12_compat.c
changeset 72 d20d9d70694b
parent 71 7a5593f0cd40
child 73 040f36454e95
     1.1 --- a/src/SDL12_compat.c	Mon Feb 18 00:43:28 2019 -0500
     1.2 +++ b/src/SDL12_compat.c	Tue Feb 19 16:40:38 2019 -0500
     1.3 @@ -1935,9 +1935,9 @@
     1.4              int i;
     1.5              SDL_Color *color = VideoSurface12->format->palette->colors;
     1.6              for (i = 0; i < 256; i++, color++) {
     1.7 -                { const int x = i & 0xe0; color->r = x >> 3 | x >> 6; }
     1.8 -                { const int x = (i << 3) & 0xe0; color->g = x >> 3 | x >> 6; }
     1.9 -                { const int x = (i & 0x3) | (i & 0x3 << 2); color->b = x | x << 4; }
    1.10 +                { const int x = i & 0xe0; color->r = x | x >> 3 | x >> 6; }
    1.11 +                { const int x = (i << 3) & 0xe0; color->g = x | x >> 3 | x >> 6; }
    1.12 +                { const int x = (i & 0x3) | ((i & 0x3) << 2); color->b = x | x << 4; }
    1.13                  color->a = 255;
    1.14              }
    1.15          }