mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-26 12:27:44 +00:00
Made error message consistent between SDL_SetSurfacePalette() and SDL_SetTexturePalette()
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user