aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/dialogs.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2009-08-16 12:10:37 +0000
committerJohannes Schickel2009-08-16 12:10:37 +0000
commit5a89bc058c844123bb1b167a5881873d00452c46 (patch)
tree8b66c21fc6401b6dec15f4d0999f2f054477b8c4 /engines/scumm/dialogs.cpp
parent86fdd698ad3c703636830e125443cd70e7a46620 (diff)
downloadscummvm-rg350-5a89bc058c844123bb1b167a5881873d00452c46.tar.gz
scummvm-rg350-5a89bc058c844123bb1b167a5881873d00452c46.tar.bz2
scummvm-rg350-5a89bc058c844123bb1b167a5881873d00452c46.zip
Fix F5's save button in DOTT CD for me. Actually I was able to reproduce the issue before I wrote this code, after reverting it for more testing, I couldn't reproduce it anymore. Probably it was some random problem, at least this code should now assure the "Save" button's state is always matching the return value of ScummEngine::canSaveGameStateCurrently.
svn-id: r43436
Diffstat (limited to 'engines/scumm/dialogs.cpp')
-rw-r--r--engines/scumm/dialogs.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/engines/scumm/dialogs.cpp b/engines/scumm/dialogs.cpp
index 93175654be..63ac952265 100644
--- a/engines/scumm/dialogs.cpp
+++ b/engines/scumm/dialogs.cpp
@@ -471,10 +471,13 @@ ScummMenuDialog::~ScummMenuDialog() {
delete _loadDialog;
}
-void ScummMenuDialog::reflowLayout() {
- if (!_vm->canSaveGameStateCurrently())
- _saveButton->setEnabled(false);
+int ScummMenuDialog::runModal() {
+ _saveButton->setEnabled(_vm->canSaveGameStateCurrently());
+ return ScummDialog::runModal();
+}
+void ScummMenuDialog::reflowLayout() {
+ _saveButton->setEnabled(_vm->canSaveGameStateCurrently());
Dialog::reflowLayout();
}