src/SDL_compat.c
changeset 1974 70deaf574153
parent 1969 5d3724f64f2b
child 1985 8055185ae4ed
     1.1 --- a/src/SDL_compat.c	Sun Aug 06 08:55:37 2006 +0000
     1.2 +++ b/src/SDL_compat.c	Sun Aug 06 23:34:59 2006 +0000
     1.3 @@ -286,7 +286,13 @@
     1.4          }
     1.5      }
     1.6      if (userdata == SDL_VideoSurface) {
     1.7 -        return SDL_SetDisplayPalette(palette->colors, 0, palette->ncolors);
     1.8 +        if (SDL_SetDisplayPalette(palette->colors, 0, palette->ncolors) < 0) {
     1.9 +            return -1;
    1.10 +        }
    1.11 +        if (SDL_SetTexturePalette
    1.12 +            (SDL_VideoTexture, palette->colors, 0, palette->ncolors) < 0) {
    1.13 +            return -1;
    1.14 +        }
    1.15      }
    1.16      return 0;
    1.17  }