mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-23 20:51:14 +00:00
MADS: Fix the setting/clearing of _mouseReleased flag
This commit is contained in:
parent
c57acfb154
commit
ce9a15f010
@ -132,6 +132,7 @@ void EventsManager::pollEvents() {
|
||||
case Common::EVENT_LBUTTONUP:
|
||||
case Common::EVENT_RBUTTONUP:
|
||||
_mouseClicked = false;
|
||||
_mouseReleased = true;
|
||||
_mouseMoved = true;
|
||||
return;
|
||||
case Common::EVENT_MOUSEMOVE:
|
||||
@ -186,4 +187,9 @@ void EventsManager::initVars() {
|
||||
_vD2 = _vD8 = 0;
|
||||
}
|
||||
|
||||
void EventsManager::resetMouseFlags() {
|
||||
_mouseClicked = false;
|
||||
_mouseReleased = false;
|
||||
}
|
||||
|
||||
} // End of namespace MADS
|
||||
|
@ -141,6 +141,8 @@ public:
|
||||
uint32 getFrameCounter() const { return _frameCounter; }
|
||||
|
||||
void initVars();
|
||||
|
||||
void resetMouseFlags();
|
||||
};
|
||||
|
||||
} // End of namespace MADS
|
||||
|
@ -272,6 +272,12 @@ void Scene::loop() {
|
||||
// Handle drawing a game frame
|
||||
doFrame();
|
||||
|
||||
// Reset mouse flags
|
||||
_vm->_events->resetMouseFlags();
|
||||
|
||||
// TODO: Verify correctness of frame wait
|
||||
_vm->_events->waitForNextFrame();
|
||||
|
||||
if (_vm->_dialogs->_pendingDialog != DIALOG_NONE && !_vm->_game->_abortTimers
|
||||
&& _vm->_game->_player._stepEnabled)
|
||||
_reloadSceneFlag = true;
|
||||
@ -421,9 +427,6 @@ void Scene::doFrame() {
|
||||
_activeAnimation->free();
|
||||
_activeAnimation = nullptr;
|
||||
}
|
||||
|
||||
// TODO: Verify correctness of frame wait
|
||||
_vm->_events->waitForNextFrame();
|
||||
}
|
||||
|
||||
void Scene::drawElements(ScreenTransition transitionType, bool surfaceFlag) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user