diff options
Diffstat (limited to 'backends')
-rw-r--r-- | backends/platform/sdl/graphics.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/backends/platform/sdl/graphics.cpp b/backends/platform/sdl/graphics.cpp index c8bd62c572..290f531278 100644 --- a/backends/platform/sdl/graphics.cpp +++ b/backends/platform/sdl/graphics.cpp @@ -1226,8 +1226,7 @@ void OSystem_SDL::setPalette(const byte *colors, uint start, uint num) { assert(colors); #ifdef USE_RGB_COLOR - if (_screenFormat.bytesPerPixel > 1) - return; //not using a paletted pixel format + assert(_screenFormat.bytesPerPixel == 1); #endif // Setting the palette before _screen is created is allowed - for now - @@ -1260,6 +1259,11 @@ void OSystem_SDL::setPalette(const byte *colors, uint start, uint num) { void OSystem_SDL::grabPalette(byte *colors, uint start, uint num) { assert(colors); + +#ifdef USE_RGB_COLOR + assert(_screenFormat.bytesPerPixel == 1); +#endif + const SDL_Color *base = _currentPalette + start; for (uint i = 0; i < num; ++i) { |