From 95074af35ce7e91b0b7cc9bbafde134aeabb7ed7 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Fri, 2 Jan 2009 22:10:00 +0000 Subject: Fixed crash when returning to launcher from a 640x480 game running with a non 1x scaler. svn-id: r35686 --- gui/dialog.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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), -- cgit v1.2.3