diff options
author | Bastien Bouclet | 2018-04-26 22:14:37 +0200 |
---|---|---|
committer | Bastien Bouclet | 2018-04-26 22:14:37 +0200 |
commit | e1c6d4485ddc2d101ddab6cbc25bdb44535c6c52 (patch) | |
tree | 7d35f892e5d7bd057d6a943ef7ddd40f07c31384 /engines/mohawk | |
parent | 3d2509a89c1a1fa668532ed71c99b21a255e7046 (diff) | |
download | scummvm-rg350-e1c6d4485ddc2d101ddab6cbc25bdb44535c6c52.tar.gz scummvm-rg350-e1c6d4485ddc2d101ddab6cbc25bdb44535c6c52.tar.bz2 scummvm-rg350-e1c6d4485ddc2d101ddab6cbc25bdb44535c6c52.zip |
MOHAWK: MYST: Don't play the credits when quitting in the middle of a script
Playing the credits unloads the data required by the rest of the script.
Fixes Trac#10502.
Diffstat (limited to 'engines/mohawk')
-rw-r--r-- | engines/mohawk/myst.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/engines/mohawk/myst.cpp b/engines/mohawk/myst.cpp index b86e3374cf..c0e3405845 100644 --- a/engines/mohawk/myst.cpp +++ b/engines/mohawk/myst.cpp @@ -446,9 +446,16 @@ void MohawkEngine_Myst::doFrame() { } if (_needsShowCredits) { - _cursor->hideCursor(); - changeToStack(kCreditsStack, 10000, 0, 0); - _needsShowCredits = false; + if (_interactive) { + _cursor->hideCursor(); + changeToStack(kCreditsStack, 10000, 0, 0); + _needsShowCredits = false; + } else { + // Showing the credits in the middle of a script is not possible + // because it unloads the previous age, removing data needed by the + // rest of the script. Instead we just quit without showing the credits. + quitGame(); + } } break; case Common::KEYCODE_ESCAPE: |