aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2008-09-14 18:19:22 +0000
committerJohannes Schickel2008-09-14 18:19:22 +0000
commited40e5d374b1536e249e8256a476dc85460ca36d (patch)
treebad0da4b6919e31d79cad4f126ed1c6c67091d21
parentdc31d1d9a86945abb711f58cce113c2966483634 (diff)
downloadscummvm-rg350-ed40e5d374b1536e249e8256a476dc85460ca36d.tar.gz
scummvm-rg350-ed40e5d374b1536e249e8256a476dc85460ca36d.tar.bz2
scummvm-rg350-ed40e5d374b1536e249e8256a476dc85460ca36d.zip
Committed patch by [md5] from bug tracker item #2100790 "GUI:Clicking "Load" when no games are added triggers a crash".
svn-id: r34530
-rw-r--r--gui/launcher.cpp9
-rw-r--r--gui/launcher.h1
2 files changed, 8 insertions, 2 deletions
diff --git a/gui/launcher.cpp b/gui/launcher.cpp
index 8039a49509..8a0b712031 100644
--- a/gui/launcher.cpp
+++ b/gui/launcher.cpp
@@ -662,8 +662,9 @@ LauncherDialog::LauncherDialog()
new ButtonWidget(this, "launcher_options_button", "Options", kOptionsCmd, 'O');
_startButton =
new ButtonWidget(this, "launcher_start_button", "Start", kStartCmd, 'S');
-
- new ButtonWidget(this, "launcher_loadGame_button", "Load", kLoadGameCmd, 'L');
+
+ _loadButton =
+ new ButtonWidget(this, "launcher_loadGame_button", "Load", kLoadGameCmd, 'L');
// Above the lowest button rows: two more buttons (directly below the list box)
_addButton =
@@ -1067,6 +1068,10 @@ void LauncherDialog::updateButtons() {
_removeButton->setEnabled(enable);
_removeButton->draw();
}
+ if (enable != _loadButton->isEnabled()) {
+ _loadButton->setEnabled(enable);
+ _loadButton->draw();
+ }
// Update the label of the "Add" button depending on whether shift is pressed or not
int modifiers = g_system->getEventManager()->getModifierState();
diff --git a/gui/launcher.h b/gui/launcher.h
index 7bb6d9dc4a..a8173d220e 100644
--- a/gui/launcher.h
+++ b/gui/launcher.h
@@ -54,6 +54,7 @@ protected:
ListWidget *_list;
ButtonWidget *_addButton;
Widget *_startButton;
+ Widget *_loadButton;
Widget *_editButton;
Widget *_removeButton;
#ifndef DISABLE_FANCY_THEMES