diff options
| author | Johannes Schickel | 2010-10-13 03:57:44 +0000 | 
|---|---|---|
| committer | Johannes Schickel | 2010-10-13 03:57:44 +0000 | 
| commit | 75e8452b6e6a2bf4fb2f588aa00b428a60d873b5 (patch) | |
| tree | f29541d55309487a94bd1d38e8b53bb3dde9aec6 /engines/gob/util.cpp | |
| parent | 48ee83b88957dab86bc763e9ef21a70179fa8679 (diff) | |
| parent | e9f50882ea5b6beeefa994040be9d3bab6a1f107 (diff) | |
| download | scummvm-rg350-75e8452b6e6a2bf4fb2f588aa00b428a60d873b5.tar.gz scummvm-rg350-75e8452b6e6a2bf4fb2f588aa00b428a60d873b5.tar.bz2 scummvm-rg350-75e8452b6e6a2bf4fb2f588aa00b428a60d873b5.zip | |
OPENGL: Merged from trunk, from rev 52105 to 53396.
This includes an rather hacky attempt to merge all the recent gp2x backend
changes into the branch. I suppose the gp2x backend and probably all new
backends, i.e. gph, dingux etc., might not compile anymore.
Since I have no way of testing those it would be nice if porters could look
into getting those up to speed in this branch.
svn-id: r53399
Diffstat (limited to 'engines/gob/util.cpp')
| -rw-r--r-- | engines/gob/util.cpp | 9 | 
1 files changed, 6 insertions, 3 deletions
| diff --git a/engines/gob/util.cpp b/engines/gob/util.cpp index 26899232e2..00d8c2c9ac 100644 --- a/engines/gob/util.cpp +++ b/engines/gob/util.cpp @@ -316,8 +316,11 @@ void Util::clearPalette() {  	_vm->validateVideoMode(_vm->_global->_videoMode);  	if (_vm->_global->_setAllPalette) { -		memset(colors, 0, 1024); -		g_system->setPalette(colors, 0, 256); +		if (_vm->getPixelFormat().bytesPerPixel == 1) { +			memset(colors, 0, 1024); +			g_system->setPalette(colors, 0, 256); +		} +  		return;  	} @@ -435,7 +438,7 @@ void Util::cleanupStr(char *str) {  		cutFromStr(str, 0, 1);  	// Trim spaces right -	while ((strlen(str) > 0) && (str[strlen(str) - 1] == ' ')) +	while ((*str != '\0') && (str[strlen(str) - 1] == ' '))  		cutFromStr(str, strlen(str) - 1, 1);  	// Merge double spaces | 
