GUI: More object initialization cleanup

This commit is contained in:
Eugene Sandulenko 2016-06-01 12:10:33 +02:00
parent b590cc2d8f
commit c7ad2155fc
4 changed files with 13 additions and 1 deletions

View file

@ -311,6 +311,12 @@ ThemeEngine::ThemeEngine(Common::String id, GraphicsMode mode) :
_themeArchive = 0; _themeArchive = 0;
_initOk = false; _initOk = false;
_cursorHotspotX = _cursorHotspotY = 0;
_cursorWidth = _cursorHeight = 0;
_cursorPalSize = 0;
_needPaletteUpdates = false;
// We prefer files in archive bundles over the common search paths. // We prefer files in archive bundles over the common search paths.
_themeFiles.add("default", &SearchMan, 0, false); _themeFiles.add("default", &SearchMan, 0, false);
} }

View file

@ -32,7 +32,7 @@ namespace GUI {
Tooltip::Tooltip() : Tooltip::Tooltip() :
Dialog(-1, -1, -1, -1), _maxWidth(-1) { Dialog(-1, -1, -1, -1), _maxWidth(-1), _parent(NULL), _xdelta(0), _ydelta(0) {
_backgroundType = GUI::ThemeEngine::kDialogBackgroundTooltip; _backgroundType = GUI::ThemeEngine::kDialogBackgroundTooltip;
} }

View file

@ -51,6 +51,8 @@ Dialog::Dialog(int x, int y, int w, int h)
// will for example crash after returning to the launcher when the user // will for example crash after returning to the launcher when the user
// started a 640x480 game with a non 1x scaler. // started a 640x480 game with a non 1x scaler.
g_gui.checkScreenChange(); g_gui.checkScreenChange();
_result = -1;
} }
Dialog::Dialog(const Common::String &name) Dialog::Dialog(const Common::String &name)
@ -66,6 +68,8 @@ Dialog::Dialog(const Common::String &name)
// Fixes bug #1590596: "HE: When 3x graphics are choosen, F5 crashes game" // Fixes bug #1590596: "HE: When 3x graphics are choosen, F5 crashes game"
// and bug #1595627: "SCUMM: F5 crashes game (640x480)" // and bug #1595627: "SCUMM: F5 crashes game (640x480)"
g_gui.checkScreenChange(); g_gui.checkScreenChange();
_result = -1;
} }
int Dialog::runModal() { int Dialog::runModal() {

View file

@ -282,6 +282,7 @@ EditGameDialog::EditGameDialog(const String &domain, const String &desc)
// //
// 6) The MIDI tab // 6) The MIDI tab
// //
_globalMIDIOverride = false;
if (!_guioptions.contains(GUIO_NOMIDI)) { if (!_guioptions.contains(GUIO_NOMIDI)) {
tab->addTab(_("MIDI")); tab->addTab(_("MIDI"));
@ -296,6 +297,7 @@ EditGameDialog::EditGameDialog(const String &domain, const String &desc)
// //
// 7) The MT-32 tab // 7) The MT-32 tab
// //
_globalMT32Override = false;
if (!_guioptions.contains(GUIO_NOMIDI)) { if (!_guioptions.contains(GUIO_NOMIDI)) {
tab->addTab(_("MT-32")); tab->addTab(_("MT-32"));