aboutsummaryrefslogtreecommitdiff
path: root/graphics/video
diff options
context:
space:
mode:
authorMatthew Hoops2010-09-12 18:31:10 +0000
committerMatthew Hoops2010-09-12 18:31:10 +0000
commitbb1c8c3f51cd9856fc3e1629cf31c8f9539221c8 (patch)
tree44fcc04d9035bd9ae1966c42a6d606a4f67bae97 /graphics/video
parentde6555663d1c19b6658601df4b987d605183aeef (diff)
downloadscummvm-rg350-bb1c8c3f51cd9856fc3e1629cf31c8f9539221c8.tar.gz
scummvm-rg350-bb1c8c3f51cd9856fc3e1629cf31c8f9539221c8.tar.bz2
scummvm-rg350-bb1c8c3f51cd9856fc3e1629cf31c8f9539221c8.zip
VIDEO: Fix rounding the Smacker frame rate
_frameRate is now stored using Common::Rational instead of uint32. svn-id: r52689
Diffstat (limited to 'graphics/video')
-rw-r--r--graphics/video/smk_decoder.cpp4
-rw-r--r--graphics/video/smk_decoder.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/graphics/video/smk_decoder.cpp b/graphics/video/smk_decoder.cpp
index 4d03305cce..504f92cc3a 100644
--- a/graphics/video/smk_decoder.cpp
+++ b/graphics/video/smk_decoder.cpp
@@ -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;
diff --git a/graphics/video/smk_decoder.h b/graphics/video/smk_decoder.h
index 43bb84a4f8..516fd5aab6 100644
--- a/graphics/video/smk_decoder.h
+++ b/graphics/video/smk_decoder.h
@@ -120,7 +120,7 @@ private:
byte *_palette;
bool _dirtyPalette;
- uint32 _frameRate;
+ Common::Rational _frameRate;
uint32 _frameCount;
Surface *_surface;