aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2003-12-25 02:55:00 +0000
committerMax Horn2003-12-25 02:55:00 +0000
commit01c4fd955c80ac2d0009911d3fe1a1f590d7369d (patch)
tree75e6b6d8e817a9ef9bbabb4a634f30ae1423a159
parentb241e31e04cc7524e0e8176373744ce054ce4d83 (diff)
downloadscummvm-rg350-01c4fd955c80ac2d0009911d3fe1a1f590d7369d.tar.gz
scummvm-rg350-01c4fd955c80ac2d0009911d3fe1a1f590d7369d.tar.bz2
scummvm-rg350-01c4fd955c80ac2d0009911d3fe1a1f590d7369d.zip
Fix pause mode during video/smush playback
svn-id: r11899
-rw-r--r--scumm/scumm.h1
-rw-r--r--scumm/scummvm.cpp8
-rw-r--r--scumm/smush/smush_player.cpp3
3 files changed, 10 insertions, 2 deletions
diff --git a/scumm/scumm.h b/scumm/scumm.h
index 0ae14807e6..b489b6da41 100644
--- a/scumm/scumm.h
+++ b/scumm/scumm.h
@@ -338,6 +338,7 @@ public:
int _smushFrameRate;
bool _insaneState;
bool _videoFinished;
+ bool _smushPaused;
void pauseGame();
void restart();
diff --git a/scumm/scummvm.cpp b/scumm/scummvm.cpp
index 9c13d60174..de24813638 100644
--- a/scumm/scummvm.cpp
+++ b/scumm/scummvm.cpp
@@ -315,6 +315,7 @@ ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst, const ScummGameS
_smushFrameRate = 0;
_insaneState = false;
_videoFinished = false;
+ _smushPaused = false;
_quit = false;
_pauseDialog = NULL;
_optionsDialog = NULL;
@@ -2533,9 +2534,11 @@ void ScummEngine::startManiac() {
#pragma mark -
int ScummEngine::runDialog(Dialog &dialog) {
- // Pause sound put
+ // Pause sound & video
bool old_soundsPaused = _sound->_soundsPaused;
_sound->pauseSounds(true);
+ bool oldSmushPaused = _smushPaused;
+ _smushPaused = true;
// Open & run the dialog
int result = dialog.runModal();
@@ -2543,8 +2546,9 @@ int ScummEngine::runDialog(Dialog &dialog) {
// Restore old cursor
updateCursor();
- // Resume sound output
+ // Resume sound & video
_sound->pauseSounds(old_soundsPaused);
+ _smushPaused = oldSmushPaused;
// Return the result
return result;
diff --git a/scumm/smush/smush_player.cpp b/scumm/smush/smush_player.cpp
index 5386aec08d..65684a4d5f 100644
--- a/scumm/smush/smush_player.cpp
+++ b/scumm/smush/smush_player.cpp
@@ -865,6 +865,9 @@ void SmushPlayer::setupAnim(const char *file, const char *directory) {
}
void SmushPlayer::parseNextFrame() {
+ if (_scumm->_smushPaused)
+ return;
+
if (_base->eof()) {
_scumm->_videoFinished = true;
return;