diff options
author | Andre Heider | 2010-04-20 21:16:58 +0000 |
---|---|---|
committer | Andre Heider | 2010-04-20 21:16:58 +0000 |
commit | 845d1869d8612ba408333bda01b7c687c64bf9b1 (patch) | |
tree | 2bfb406e56953067381b5fd11b0795b35f344445 /backends | |
parent | 74c0db4548afbc879bbe48bd0eee228917d8ff8a (diff) | |
download | scummvm-rg350-845d1869d8612ba408333bda01b7c687c64bf9b1.tar.gz scummvm-rg350-845d1869d8612ba408333bda01b7c687c64bf9b1.tar.bz2 scummvm-rg350-845d1869d8612ba408333bda01b7c687c64bf9b1.zip |
abort() when calling setPalette() or grabPalette() in non CLUT8 modes.
svn-id: r48757
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) { |