SCUMM: fix bug in cb661d63d0cd45d1231435a593b74dfc51872a0f

This commit is contained in:
athrxx 2011-06-16 21:31:45 +02:00
parent 283872018b
commit 1a58262ca7

View File

@ -1164,8 +1164,10 @@ Common::Error ScummEngine::init() {
} else {
Common::List<Graphics::PixelFormat> tryModes = _system->getSupportedFormats();
for (Common::List<Graphics::PixelFormat>::iterator g = tryModes.begin(); g != tryModes.end(); ++g) {
if (g->bytesPerPixel != 2 || g->aBits())
if (g->bytesPerPixel != 2 || g->aBits()) {
g = tryModes.erase(g);
g--;
}
if (*g == _outputPixelFormat) {
tryModes.clear();