diff options
author | Johannes Schickel | 2009-08-16 12:10:37 +0000 |
---|---|---|
committer | Johannes Schickel | 2009-08-16 12:10:37 +0000 |
commit | 5a89bc058c844123bb1b167a5881873d00452c46 (patch) | |
tree | 8b66c21fc6401b6dec15f4d0999f2f054477b8c4 /engines | |
parent | 86fdd698ad3c703636830e125443cd70e7a46620 (diff) | |
download | scummvm-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')
-rw-r--r-- | engines/scumm/dialogs.cpp | 9 | ||||
-rw-r--r-- | engines/scumm/dialogs.h | 1 |
2 files changed, 7 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(); } diff --git a/engines/scumm/dialogs.h b/engines/scumm/dialogs.h index d4ecbde534..85b562ed67 100644 --- a/engines/scumm/dialogs.h +++ b/engines/scumm/dialogs.h @@ -90,6 +90,7 @@ public: virtual void reflowLayout(); + int runModal(); protected: ScummEngine *_vm; |