[Scummvm-cvs-logs] SF.net SVN: scummvm:[48757] scummvm/trunk/backends/platform/sdl/graphics. cpp

dhewg at users.sourceforge.net dhewg at users.sourceforge.net
Tue Apr 20 23:16:59 CEST 2010


Revision: 48757
          http://scummvm.svn.sourceforge.net/scummvm/?rev=48757&view=rev
Author:   dhewg
Date:     2010-04-20 21:16:58 +0000 (Tue, 20 Apr 2010)

Log Message:
-----------
abort() when calling setPalette() or grabPalette() in non CLUT8 modes.

Modified Paths:
--------------
    scummvm/trunk/backends/platform/sdl/graphics.cpp

Modified: scummvm/trunk/backends/platform/sdl/graphics.cpp
===================================================================
--- scummvm/trunk/backends/platform/sdl/graphics.cpp	2010-04-20 20:22:33 UTC (rev 48756)
+++ scummvm/trunk/backends/platform/sdl/graphics.cpp	2010-04-20 21:16:58 UTC (rev 48757)
@@ -1226,8 +1226,7 @@
 	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::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) {


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list