aboutsummaryrefslogtreecommitdiff
path: root/engines/mads/menu_views.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2014-10-16 21:53:21 -0400
committerPaul Gilbert2014-10-16 21:53:21 -0400
commitdee4fd193d690baae5afaf906d7604a9df9155ef (patch)
tree97609b31307cea99f6a7419679062fc8a23fd333 /engines/mads/menu_views.cpp
parentfa5c22393138034efceb908e012f6783b65f36f5 (diff)
downloadscummvm-rg350-dee4fd193d690baae5afaf906d7604a9df9155ef.tar.gz
scummvm-rg350-dee4fd193d690baae5afaf906d7604a9df9155ef.tar.bz2
scummvm-rg350-dee4fd193d690baae5afaf906d7604a9df9155ef.zip
MADS: Fix stopping digital audio, music, and palette cycling when animation ends
Diffstat (limited to 'engines/mads/menu_views.cpp')
-rw-r--r--engines/mads/menu_views.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/engines/mads/menu_views.cpp b/engines/mads/menu_views.cpp
index 6acf6cdf9f..857db68fa6 100644
--- a/engines/mads/menu_views.cpp
+++ b/engines/mads/menu_views.cpp
@@ -475,6 +475,13 @@ AnimationView::AnimationView(MADSEngine *vm) : MenuView(vm) {
}
AnimationView::~AnimationView() {
+ // Turn off palette cycling as well as any playing sound
+ Scene &scene = _vm->_game->_scene;
+ scene._cyclingActive = false;
+ _vm->_sound->stop();
+ _vm->_audio->stop();
+
+ // Delete data
delete _currentAnimation;
delete _sceneInfo;
}
@@ -505,7 +512,7 @@ void AnimationView::display() {
bool AnimationView::onEvent(Common::Event &event) {
// Wait for the Escape key or a mouse press
if (((event.type == Common::EVENT_KEYDOWN) && (event.kbd.keycode == Common::KEYCODE_ESCAPE)) ||
- (event.type == Common::EVENT_RBUTTONUP)) {
+ (event.type == Common::EVENT_LBUTTONUP)) {
scriptDone();
return true;
}