Skip to content

Commit

Permalink
PEGASUS: Fix frames after turning
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Hoops committed Oct 8, 2011
1 parent e1dc4db commit 8a717d2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
11 changes: 11 additions & 0 deletions engines/pegasus/movie.cpp
Expand Up @@ -177,6 +177,17 @@ void Movie::pause() {
TimeBase::pause();
}

TimeValue Movie::getDuration(const TimeScale scale) const {
// Unlike TimeBase::getDuration(), this returns the whole duration of the movie
// The original source has a TODO to make this behave like TimeBase::getDuration(),
// but the problem is that too much code requires this function to behave this way...

if (_video)
return _video->getDuration() * ((scale == 0) ? getScale() : scale) / 1000;

return 0;
}

void Movie::checkCallBacks() {
TimeBase::checkCallBacks();

Expand Down
2 changes: 2 additions & 0 deletions engines/pegasus/movie.h
Expand Up @@ -64,6 +64,8 @@ class Movie : public Animation, public PixelImage {

virtual void moveMovieBoxTo(const tCoordType, const tCoordType);

virtual TimeValue getDuration(const TimeScale = 0) const;

// *** HACK ALERT
Video::SeekableVideoDecoder *getMovie() { return _video; }
void setVolume(uint16);
Expand Down

0 comments on commit 8a717d2

Please sign in to comment.