VIDEO: Fix rounding the Smacker frame rate

_frameRate is now stored using Common::Rational instead of uint32.

svn-id: r52689
This commit is contained in:
Matthew Hoops 2010-09-12 18:31:10 +00:00
parent de6555663d
commit bb1c8c3f51
2 changed files with 3 additions and 3 deletions

View File

@ -390,9 +390,9 @@ bool SmackerDecoder::load(Common::SeekableReadStream *stream) {
int32 frameRate = _fileStream->readSint32LE();
if (frameRate > 0)
_frameRate = 1000 / frameRate;
_frameRate = Common::Rational(1000, frameRate);
else if (frameRate < 0)
_frameRate = 100000 / (-frameRate);
_frameRate = Common::Rational(100000, -frameRate);
else
_frameRate = 10;

View File

@ -120,7 +120,7 @@ private:
byte *_palette;
bool _dirtyPalette;
uint32 _frameRate;
Common::Rational _frameRate;
uint32 _frameCount;
Surface *_surface;