diff options
author | Max Horn | 2003-03-28 22:42:48 +0000 |
---|---|---|
committer | Max Horn | 2003-03-28 22:42:48 +0000 |
commit | e0a880addbe60f57be441a79db99cc0234eb903e (patch) | |
tree | 13b2b91f698e1f5575217dc70699e0cbd0d0285f /scumm/smush | |
parent | fe58fd4d1e251066ca0e2591f829a12b1096a131 (diff) | |
download | scummvm-rg350-e0a880addbe60f57be441a79db99cc0234eb903e.tar.gz scummvm-rg350-e0a880addbe60f57be441a79db99cc0234eb903e.tar.bz2 scummvm-rg350-e0a880addbe60f57be441a79db99cc0234eb903e.zip |
this should fix one of those nasty deadlocks, I hope
svn-id: r6876
Diffstat (limited to 'scumm/smush')
-rw-r--r-- | scumm/smush/smush_player.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/scumm/smush/smush_player.cpp b/scumm/smush/smush_player.cpp index f49272d40e..c193830b7d 100644 --- a/scumm/smush/smush_player.cpp +++ b/scumm/smush/smush_player.cpp @@ -189,6 +189,10 @@ static StringResource *getStrings(const char *file, const char *directory, bool SmushPlayer *player; void smush_callback(void *ptr) { + Scumm *scumm = (Scumm *)ptr; + if (scumm->_smushPlay == false) + return; + player->_smushProcessFrame = true; player->parseNextFrame(); player->_smushProcessFrame = false; @@ -252,8 +256,8 @@ void SmushPlayer::init() { void SmushPlayer::deinit() { _scumm->_smushPlay = false; - _scumm->_timer->releaseProcedure(&smush_callback); while (_smushProcessFrame) {} + _scumm->_timer->releaseProcedure(&smush_callback); for(int i = 0; i < 5; i++) { if (_sf[i]) { @@ -824,9 +828,6 @@ void SmushPlayer::setupAnim(const char *file, const char *directory) { } void SmushPlayer::parseNextFrame() { - if (_scumm->_smushPlay == false) - return; - Chunk *sub = _base->subBlock(); if (_base->eof()) { _scumm->_videoFinished = true; |