TITANIC: Pause the engine while the save/load dialogs are open

This commit is contained in:
Bastien Bouclet 2017-08-20 10:17:00 +02:00
parent a99891c2f3
commit 42c6f68f7a

View File

@ -267,7 +267,10 @@ void TitanicEngine::showScummVMSaveDialog() {
GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser(_("Save game:"), _("Save"), true);
pauseEngine(true);
int slot = dialog->runModalWithCurrentTarget();
pauseEngine(false);
if (slot >= 0) {
Common::String desc = dialog->getResultString();
@ -289,7 +292,10 @@ void TitanicEngine::showScummVMRestoreDialog() {
GUI::SaveLoadChooser *dialog = new GUI::SaveLoadChooser(_("Restore game:"), _("Restore"), false);
pauseEngine(true);
int slot = dialog->runModalWithCurrentTarget();
pauseEngine(false);
if (slot >= 0) {
loadGameState(slot);
}