aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/scumm/scumm.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index 78effaffec..f94496b14b 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -1169,15 +1169,13 @@ 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(); ) {
+ for (Common::List<Graphics::PixelFormat>::iterator g = tryModes.begin(); g != tryModes.end(); ++g) {
if (g->bytesPerPixel != 2 || g->aBits()) {
- g = tryModes.erase(g);
+ g = tryModes.reverse_erase(g);
} else if (*g == _outputPixelFormat) {
tryModes.clear();
tryModes.push_back(_outputPixelFormat);
break;
- } else {
- ++g;
}
}