diff options
Diffstat (limited to 'engines/mohawk/riven_stack.cpp')
-rw-r--r-- | engines/mohawk/riven_stack.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/engines/mohawk/riven_stack.cpp b/engines/mohawk/riven_stack.cpp index 2e1fd69082..847a98f5ab 100644 --- a/engines/mohawk/riven_stack.cpp +++ b/engines/mohawk/riven_stack.cpp @@ -40,6 +40,7 @@ RivenStack::RivenStack(MohawkEngine_Riven *vm, uint16 id) : _vm(vm), _id(id), _mouseIsDown(false), + _shouldRefreshMouseCursor(false), _keyPressed(Common::KEYCODE_INVALID) { removeTimer(); @@ -275,6 +276,10 @@ void RivenStack::mouseForceUp() { _mouseIsDown = false; } +void RivenStack::queueMouseCursorRefresh() { + _shouldRefreshMouseCursor = true; +} + void RivenStack::onFrame() { if (!_vm->getCard() || _vm->_scriptMan->hasQueuedScripts()) { return; @@ -284,6 +289,11 @@ void RivenStack::onFrame() { _vm->_gfx->updateEffects(); + if (_shouldRefreshMouseCursor) { + _vm->getCard()->onMouseMove(getMousePosition()); + _shouldRefreshMouseCursor = false; + } + RivenScriptPtr script(new RivenScript()); if (_mouseIsDown) { script += _vm->getCard()->onMouseDragUpdate(); |