aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2017-07-15 11:29:21 -0400
committerPaul Gilbert2017-07-15 11:29:21 -0400
commitfe1617ac513932b4ae5e202ad6bb4ee61289ecb0 (patch)
treea8ecad76ac637047c73525f839dd13389eb8a24c
parent4a6feaefc8e18598defacaa03ebdd334a4708cb4 (diff)
downloadscummvm-rg350-fe1617ac513932b4ae5e202ad6bb4ee61289ecb0.tar.gz
scummvm-rg350-fe1617ac513932b4ae5e202ad6bb4ee61289ecb0.tar.bz2
scummvm-rg350-fe1617ac513932b4ae5e202ad6bb4ee61289ecb0.zip
TITANIC: Fix pause during intro credits cutscene
-rw-r--r--engines/titanic/support/avi_surface.cpp19
-rw-r--r--engines/titanic/support/movie.cpp1
2 files changed, 14 insertions, 6 deletions
diff --git a/engines/titanic/support/avi_surface.cpp b/engines/titanic/support/avi_surface.cpp
index 69c006e6e8..11b6b68ca4 100644
--- a/engines/titanic/support/avi_surface.cpp
+++ b/engines/titanic/support/avi_surface.cpp
@@ -472,11 +472,20 @@ Graphics::ManagedSurface *AVISurface::duplicateTransparency() const {
}
void AVISurface::playCutscene(const Rect &r, uint startFrame, uint endFrame) {
- bool isDifferent = _movieFrameSurface[0]->w != r.width() ||
- _movieFrameSurface[0]->h != r.height();
-
- startAtFrame(startFrame);
- _currentFrame = startFrame;
+ bool isDifferent = false;
+
+ if (_currentFrame != ((int)startFrame - 1) || startFrame == 0) {
+ // Start video playback at the desired starting frame
+ setFrame(startFrame);
+ isDifferent = _movieFrameSurface[0]->w != r.width() ||
+ _movieFrameSurface[0]->h != r.height();
+
+ startAtFrame(startFrame);
+ _currentFrame = startFrame;
+ } else {
+ // Already in position, so pick up where we left off
+ _decoder->start();
+ }
while (_currentFrame < (int)endFrame && !g_vm->shouldQuit()) {
if (isNextFrame()) {
diff --git a/engines/titanic/support/movie.cpp b/engines/titanic/support/movie.cpp
index 3095715bc9..eb65cf1a8a 100644
--- a/engines/titanic/support/movie.cpp
+++ b/engines/titanic/support/movie.cpp
@@ -124,7 +124,6 @@ void OSMovie::playCutscene(const Rect &drawRect, uint startFrame, uint endFrame)
CEventTarget eventTarget;
g_vm->_events->addTarget(&eventTarget);
- _aviSurface.setFrame(startFrame);
_aviSurface.playCutscene(drawRect, startFrame, endFrame);
g_vm->_events->removeTarget();