diff options
author | Filippos Karapetis | 2008-11-06 16:31:34 +0000 |
---|---|---|
committer | Filippos Karapetis | 2008-11-06 16:31:34 +0000 |
commit | 2b0346ca5e3e85c3d25b5c14b6e5880d6f70475b (patch) | |
tree | f52b589956e80422325681c01693d4657ca80768 /engines | |
parent | 8f33d4a40aef337673fe98bb3b44be300fe697e6 (diff) | |
download | scummvm-rg350-2b0346ca5e3e85c3d25b5c14b6e5880d6f70475b.tar.gz scummvm-rg350-2b0346ca5e3e85c3d25b5c14b6e5880d6f70475b.tar.bz2 scummvm-rg350-2b0346ca5e3e85c3d25b5c14b6e5880d6f70475b.zip |
Fix for bug #2071125 - "MICKEY: Mouse movement‏", by using the waitForTimer() function from the SCUMM engine
svn-id: r34914
Diffstat (limited to 'engines')
-rw-r--r-- | engines/agi/preagi.h | 1 | ||||
-rw-r--r-- | engines/agi/preagi_common.cpp | 12 |
2 files changed, 12 insertions, 1 deletions
diff --git a/engines/agi/preagi.h b/engines/agi/preagi.h index d95035a073..73288de93c 100644 --- a/engines/agi/preagi.h +++ b/engines/agi/preagi.h @@ -88,6 +88,7 @@ public: Common::SaveFileManager* getSaveFileMan() { return _saveFileMan; } void playNote(int16 frequency, int32 length); + void waitForTimer(int msec_delay); private: int _defaultColor; diff --git a/engines/agi/preagi_common.cpp b/engines/agi/preagi_common.cpp index ad26879ca1..74dcd75edb 100644 --- a/engines/agi/preagi_common.cpp +++ b/engines/agi/preagi_common.cpp @@ -193,7 +193,17 @@ int PreAgiEngine::getSelection(SelectionTypes type) { void PreAgiEngine::playNote(int16 frequency, int32 length) { _speakerStream->play(Audio::PCSpeaker::kWaveFormSquare, frequency, length); - _system->delayMillis(length); + waitForTimer(length); +} + +void PreAgiEngine::waitForTimer(int msec_delay) { + uint32 start_time = _system->getMillis(); + + while (_system->getMillis() < start_time + msec_delay) { + _gfx->doUpdate(); + _system->updateScreen(); + _system->delayMillis(10); + } } } |