MOHAWK: Fix MohawkEngine_Myst::runLoadDialog

This incorrectly invoked (indirectly) the runModal() method of a
SaveLoadChooser, but for that one should use runModalWithPluginAndTarget
instead.

svn-id: r55816
This commit is contained in:
Max Horn 2011-02-07 22:58:42 +00:00
parent 41121be4d6
commit 7bac92388f
2 changed files with 13 additions and 3 deletions

View File

@ -219,7 +219,7 @@ void MainMenuDialog::reflowLayout() {
}
void MainMenuDialog::save() {
Common::String gameId = ConfMan.get("gameid");
const Common::String gameId = ConfMan.get("gameid");
const EnginePlugin *plugin = 0;
EngineMan.findGame(gameId, &plugin);
@ -242,7 +242,7 @@ void MainMenuDialog::save() {
}
void MainMenuDialog::load() {
Common::String gameId = ConfMan.get("gameid");
const Common::String gameId = ConfMan.get("gameid");
const EnginePlugin *plugin = 0;
EngineMan.findGame(gameId, &plugin);

View File

@ -1147,7 +1147,17 @@ void MohawkEngine_Myst::loadResources() {
}
void MohawkEngine_Myst::runLoadDialog() {
runDialog(*_loadDialog);
const Common::String gameId = ConfMan.get("gameid");
const EnginePlugin *plugin = 0;
EngineMan.findGame(gameId, &plugin);
pauseEngine(true);
int slot = _loadDialog->runModalWithPluginAndTarget(plugin, ConfMan.getActiveDomainName());
if (slot >= 0) {
// TODO
}
pauseEngine(false);
}
Common::Error MohawkEngine_Myst::loadGameState(int slot) {