diff options
author | Johannes Schickel | 2009-01-02 22:10:00 +0000 |
---|---|---|
committer | Johannes Schickel | 2009-01-02 22:10:00 +0000 |
commit | 95074af35ce7e91b0b7cc9bbafde134aeabb7ed7 (patch) | |
tree | 130d1716fdfdfe0e89aa4c034dc6bd1a838971f4 /gui | |
parent | a33a5d0f146709fb4d20bc49abac3b81da73cc59 (diff) | |
download | scummvm-rg350-95074af35ce7e91b0b7cc9bbafde134aeabb7ed7.tar.gz scummvm-rg350-95074af35ce7e91b0b7cc9bbafde134aeabb7ed7.tar.bz2 scummvm-rg350-95074af35ce7e91b0b7cc9bbafde134aeabb7ed7.zip |
Fixed crash when returning to launcher from a 640x480 game running with a non 1x scaler.
svn-id: r35686
Diffstat (limited to 'gui')
-rw-r--r-- | gui/dialog.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gui/dialog.cpp b/gui/dialog.cpp index 2c42cb1d75..d2c4dedb74 100644 --- a/gui/dialog.cpp +++ b/gui/dialog.cpp @@ -45,7 +45,14 @@ namespace GUI { Dialog::Dialog(int x, int y, int w, int h) : GuiObject(x, y, w, h), _mouseWidget(0), _focusedWidget(0), _dragWidget(0), _visible(false), - _backgroundType(GUI::ThemeEngine::kDialogBackgroundDefault) {} + _backgroundType(GUI::ThemeEngine::kDialogBackgroundDefault) { + // Some dialogs like LauncherDialog use internally a fixed size, even though + // their widgets rely on the layout to be initialized correctly by the theme. + // Thus we need to catch screen changes here too. If we do not do that, it + // will for example crash after returning to the launcher when the user + // started a 640x480 game with a non 1x scaler. + g_gui.checkScreenChange(); +} Dialog::Dialog(const Common::String &name) : GuiObject(name), |