aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorTorbjörn Andersson2006-07-10 15:45:09 +0000
committerTorbjörn Andersson2006-07-10 15:45:09 +0000
commit6eecad572293815af18642382f341b866424dcc8 (patch)
tree9c202d32d3228cdcf658b8d9a8dc1286dcf1aad5 /gui
parentdcb59be8b7f87b2cd9b41af0d40457e6c74cdabc (diff)
downloadscummvm-rg350-6eecad572293815af18642382f341b866424dcc8.tar.gz
scummvm-rg350-6eecad572293815af18642382f341b866424dcc8.tar.bz2
scummvm-rg350-6eecad572293815af18642382f341b866424dcc8.zip
Call handleScreenChanged() when opening the console. Otherwise, we may get
garbage and/or crashes if the scaler has changed since the console was created. svn-id: r23480
Diffstat (limited to 'gui')
-rw-r--r--gui/console.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/gui/console.cpp b/gui/console.cpp
index cab49cccd9..464216a0ad 100644
--- a/gui/console.cpp
+++ b/gui/console.cpp
@@ -157,6 +157,13 @@ void ConsoleDialog::open() {
_slideTime = g_system->getMillis();
_slideMode = kDownSlideMode;
+ // The screen may have changed since the console was created. We have
+ // to make sure things are properly adjusted, or we may get garbage in
+ // the console, or even outright crashes. This means _scrollLine is not
+ // preserved, but that's a tiny sacrifice.
+
+ handleScreenChanged();
+
Dialog::open();
if (_promptStartPos == -1) {
print(PROMPT);