[Scummvm-cvs-logs] SF.net SVN: scummvm:[43436] scummvm/trunk/engines/scumm
lordhoto at users.sourceforge.net
lordhoto at users.sourceforge.net
Sun Aug 16 14:10:37 CEST 2009
Revision: 43436
http://scummvm.svn.sourceforge.net/scummvm/?rev=43436&view=rev
Author: lordhoto
Date: 2009-08-16 12:10:37 +0000 (Sun, 16 Aug 2009)
Log Message:
-----------
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.
Modified Paths:
--------------
scummvm/trunk/engines/scumm/dialogs.cpp
scummvm/trunk/engines/scumm/dialogs.h
Modified: scummvm/trunk/engines/scumm/dialogs.cpp
===================================================================
--- scummvm/trunk/engines/scumm/dialogs.cpp 2009-08-16 12:04:24 UTC (rev 43435)
+++ scummvm/trunk/engines/scumm/dialogs.cpp 2009-08-16 12:10:37 UTC (rev 43436)
@@ -471,10 +471,13 @@
delete _loadDialog;
}
+int ScummMenuDialog::runModal() {
+ _saveButton->setEnabled(_vm->canSaveGameStateCurrently());
+ return ScummDialog::runModal();
+}
+
void ScummMenuDialog::reflowLayout() {
- if (!_vm->canSaveGameStateCurrently())
- _saveButton->setEnabled(false);
-
+ _saveButton->setEnabled(_vm->canSaveGameStateCurrently());
Dialog::reflowLayout();
}
Modified: scummvm/trunk/engines/scumm/dialogs.h
===================================================================
--- scummvm/trunk/engines/scumm/dialogs.h 2009-08-16 12:04:24 UTC (rev 43435)
+++ scummvm/trunk/engines/scumm/dialogs.h 2009-08-16 12:10:37 UTC (rev 43436)
@@ -90,6 +90,7 @@
virtual void reflowLayout();
+ int runModal();
protected:
ScummEngine *_vm;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list