From 8ed56e1834487f44c94c6b5c5a4353bb3a889696 Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Sun, 23 May 2010 10:50:14 +0000 Subject: Keep the Broken Sword cutscene players from using up all available CPU. Probably a regression from the recent video decoder rewrite, but I haven't checked if it also present in other engines. svn-id: r49153 --- engines/sword1/animation.cpp | 2 ++ engines/sword2/animation.cpp | 2 ++ 2 files changed, 4 insertions(+) (limited to 'engines') diff --git a/engines/sword1/animation.cpp b/engines/sword1/animation.cpp index c0e7be7758..a16f000659 100644 --- a/engines/sword1/animation.cpp +++ b/engines/sword1/animation.cpp @@ -267,6 +267,8 @@ bool MoviePlayer::playVideo() { while (_vm->_system->getEventManager()->pollEvent(event)) if ((event.type == Common::EVENT_KEYDOWN && event.kbd.keycode == Common::KEYCODE_ESCAPE) || event.type == Common::EVENT_LBUTTONUP) return false; + + _vm->_system->delayMillis(10); } return !_vm->shouldQuit(); diff --git a/engines/sword2/animation.cpp b/engines/sword2/animation.cpp index c3f3e796b2..5eab7f5645 100644 --- a/engines/sword2/animation.cpp +++ b/engines/sword2/animation.cpp @@ -293,6 +293,8 @@ bool MoviePlayer::playVideo() { while (_vm->_system->getEventManager()->pollEvent(event)) if ((event.type == Common::EVENT_KEYDOWN && event.kbd.keycode == Common::KEYCODE_ESCAPE) || event.type == Common::EVENT_LBUTTONUP) return false; + + _vm->_system->delayMillis(10); } return !_vm->shouldQuit(); -- cgit v1.2.3