aboutsummaryrefslogtreecommitdiff
path: root/scumm/smush
diff options
context:
space:
mode:
authorNicolas Bacca2004-12-21 00:00:34 +0000
committerNicolas Bacca2004-12-21 00:00:34 +0000
commit1bd0c66715f4229059f2eb586455e68bff0b3128 (patch)
treec8d5d3cc16de8ab2883c1753cedd7f7083f34172 /scumm/smush
parent486e71117328eb6a3b9a889672ffbb33b749dbf5 (diff)
downloadscummvm-rg350-1bd0c66715f4229059f2eb586455e68bff0b3128.tar.gz
scummvm-rg350-1bd0c66715f4229059f2eb586455e68bff0b3128.tar.bz2
scummvm-rg350-1bd0c66715f4229059f2eb586455e68bff0b3128.zip
WinCE workaround to limit issues if the decoding is too slow
svn-id: r16220
Diffstat (limited to 'scumm/smush')
-rw-r--r--scumm/smush/smush_player.cpp14
-rw-r--r--scumm/smush/smush_player.h3
2 files changed, 17 insertions, 0 deletions
diff --git a/scumm/smush/smush_player.cpp b/scumm/smush/smush_player.cpp
index 3852ebbb59..3e5e097c0a 100644
--- a/scumm/smush/smush_player.cpp
+++ b/scumm/smush/smush_player.cpp
@@ -216,6 +216,9 @@ static StringResource *getStrings(const char *file, bool is_encoded) {
void SmushPlayer::timerCallback(void *refCon) {
((SmushPlayer *)refCon)->parseNextFrame();
+#ifdef _WIN32_WCE
+ ((SmushPlayer *)refCon)->_inTimer = true;
+#endif
}
SmushPlayer::SmushPlayer(ScummEngine_v6 *scumm, int speed) {
@@ -247,6 +250,9 @@ SmushPlayer::SmushPlayer(ScummEngine_v6 *scumm, int speed) {
_insanity = false;
_middleAudio = false;
_skipPalette = false;
+#ifdef _WIN32_WCE
+ _inTimer = false;
+#endif
}
SmushPlayer::~SmushPlayer() {
@@ -931,7 +937,12 @@ void SmushPlayer::handleFrame(Chunk &b) {
end_time = _vm->_system->getMillis();
+#ifdef _WIN32_WCE
+ if (!_inTimer)
+ updateScreen();
+#else
updateScreen();
+#endif
_smixer->handleFrame();
debugC(DEBUG_SMUSH, "Smush stats: FRME( %03d ), Limit(%d)", end_time - start_time, _speed / 1000);
@@ -1209,6 +1220,9 @@ void SmushPlayer::play(const char *filename, int32 offset, int32 startFrame) {
start_time = _vm->_system->getMillis();
_vm->_system->updateScreen();
_updateNeeded = false;
+#ifdef _WIN32_WCE
+ _inTimer = false;
+#endif
end_time = _vm->_system->getMillis();
diff --git a/scumm/smush/smush_player.h b/scumm/smush/smush_player.h
index d0ce75da41..e4a2beac6f 100644
--- a/scumm/smush/smush_player.h
+++ b/scumm/smush/smush_player.h
@@ -77,6 +77,9 @@ private:
bool _insanity;
bool _middleAudio;
bool _skipPalette;
+#ifdef _WIN32_WCE
+ bool _inTimer;
+#endif
public:
SmushPlayer(ScummEngine_v6 *scumm, int speed);