Browse Source

Made error message consistent between SDL_SetSurfacePalette() and SDL_SetTexturePalette()

Sam Lantinga 6 days ago
parent
commit
b92557c0b7
2 changed files with 2 additions and 2 deletions
  1. 1 1
      src/render/SDL_render.c
  2. 1 1
      src/video/SDL_surface.c

+ 1 - 1
src/render/SDL_render.c

@@ -1918,7 +1918,7 @@ bool SDL_SetTexturePalette(SDL_Texture *texture, SDL_Palette *palette)
     }
 
     CHECK_PARAM(palette && palette->ncolors > (1 << SDL_BITSPERPIXEL(texture->format))) {
-        return SDL_SetError("SDL_SetSurfacePalette() passed a palette that doesn't match the surface format");
+        return SDL_SetError("Palette doesn't match surface format");
     }
 
     if (palette != texture->public_palette) {

+ 1 - 1
src/video/SDL_surface.c

@@ -421,7 +421,7 @@ bool SDL_SetSurfacePalette(SDL_Surface *surface, SDL_Palette *palette)
     }
 
     CHECK_PARAM(palette && palette->ncolors > (1 << SDL_BITSPERPIXEL(surface->format))) {
-        return SDL_SetError("SDL_SetSurfacePalette() passed a palette that doesn't match the surface format");
+        return SDL_SetError("Palette doesn't match surface format");
     }
 
     if (palette != surface->palette) {