aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2008-11-03 19:55:20 +0000
committerJohannes Schickel2008-11-03 19:55:20 +0000
commit39a1eb8191cbef6dc22dc8e947daf01a0617fd28 (patch)
tree981892c27ca4288a771f6fd15c8258d4289fa1d2
parent6eab0dcc6ef053ed70eeee3145e891dba7e5749d (diff)
downloadscummvm-rg350-39a1eb8191cbef6dc22dc8e947daf01a0617fd28.tar.gz
scummvm-rg350-39a1eb8191cbef6dc22dc8e947daf01a0617fd28.tar.bz2
scummvm-rg350-39a1eb8191cbef6dc22dc8e947daf01a0617fd28.zip
Check for engine support for loading/saving via GMM when enabling/disabling the buttons.
svn-id: r34886
-rw-r--r--engines/dialogs.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/engines/dialogs.cpp b/engines/dialogs.cpp
index d0eac1d2e7..2ecb835d86 100644
--- a/engines/dialogs.cpp
+++ b/engines/dialogs.cpp
@@ -193,8 +193,12 @@ void MainMenuDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 dat
}
void MainMenuDialog::reflowLayout() {
- _loadButton->setEnabled(_engine->canLoadGameStateCurrently());
- _saveButton->setEnabled(_engine->canSaveGameStateCurrently());
+ if (_engine->hasFeature(Engine::kSupportsListSaves)) {
+ if (_engine->hasFeature(Engine::kSupportsLoadingDuringRuntime))
+ _loadButton->setEnabled(_engine->canLoadGameStateCurrently());
+ if (_engine->hasFeature(Engine::kSupportsSavingDuringRuntime))
+ _saveButton->setEnabled(_engine->canSaveGameStateCurrently());
+ }
#ifndef DISABLE_FANCY_THEMES
if (g_gui.xmlEval()->getVar("Globals.ShowGlobalMenuLogo", 0) == 1 && g_gui.theme()->supportsImages()) {