src/SDL_compat.c
changeset 1974 70deaf574153
parent 1969 5d3724f64f2b
child 1985 8055185ae4ed
--- a/src/SDL_compat.c	Sun Aug 06 08:55:37 2006 +0000
+++ b/src/SDL_compat.c	Sun Aug 06 23:34:59 2006 +0000
@@ -286,7 +286,13 @@
         }
     }
     if (userdata == SDL_VideoSurface) {
-        return SDL_SetDisplayPalette(palette->colors, 0, palette->ncolors);
+        if (SDL_SetDisplayPalette(palette->colors, 0, palette->ncolors) < 0) {
+            return -1;
+        }
+        if (SDL_SetTexturePalette
+            (SDL_VideoTexture, palette->colors, 0, palette->ncolors) < 0) {
+            return -1;
+        }
     }
     return 0;
 }