From dee4fd193d690baae5afaf906d7604a9df9155ef Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Thu, 16 Oct 2014 21:53:21 -0400 Subject: MADS: Fix stopping digital audio, music, and palette cycling when animation ends --- engines/mads/menu_views.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'engines/mads/menu_views.cpp') 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; } -- cgit v1.2.3