diff options
Diffstat (limited to 'engines/scumm/scumm.cpp')
-rw-r--r-- | engines/scumm/scumm.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index 81f6af453c..78effaffec 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -1169,16 +1169,15 @@ Common::Error ScummEngine::init() { return Common::kUnsupportedColorMode; } else { Common::List<Graphics::PixelFormat> tryModes = _system->getSupportedFormats(); - for (Common::List<Graphics::PixelFormat>::iterator g = tryModes.begin(); g != tryModes.end(); ++g) { + for (Common::List<Graphics::PixelFormat>::iterator g = tryModes.begin(); g != tryModes.end(); ) { if (g->bytesPerPixel != 2 || g->aBits()) { g = tryModes.erase(g); - g--; - } - - if (*g == _outputPixelFormat) { + } else if (*g == _outputPixelFormat) { tryModes.clear(); tryModes.push_back(_outputPixelFormat); break; + } else { + ++g; } } |