[Scummvm-git-logs] scummvm master -> 7cd29d34ca503ace2d90573bfb5358de03f1f160
sev-
noreply at scummvm.org
Sun Apr 12 23:55:30 UTC 2026
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
7cd29d34ca DIRECTOR: Process timeout events independently of frame cycle
Commit: 7cd29d34ca503ace2d90573bfb5358de03f1f160
https://github.com/scummvm/scummvm/commit/7cd29d34ca503ace2d90573bfb5358de03f1f160
Author: Lothar Serra Mari (mail at serra.me)
Date: 2026-04-13T01:55:24+02:00
Commit Message:
DIRECTOR: Process timeout events independently of frame cycle
In original DIRECTOR, timeout events fire based on elapsed
time since the last user interaction, independently of the score's frame
cycle. We previously only processed timeout events at the end of
Score::update(), after a full frame cycle completed. This meant that when
isWaitingForNextFrame() or the frame delay check caused an early return,
timeout events were never reached during those cycles.
Process kEventTimeout in the two early-return paths of Score::update()
to decouple timeout processing from frame advancement.
Changed paths:
engines/director/score.cpp
diff --git a/engines/director/score.cpp b/engines/director/score.cpp
index ca8623760a9..9398a5ceb48 100644
--- a/engines/director/score.cpp
+++ b/engines/director/score.cpp
@@ -652,6 +652,14 @@ void Score::update() {
_activeFade = _soundManager->fadeChannels();
}
+ // Process timeout events independently of the frame delay
+ if (_haveInteractivity && !_vm->_playbackPaused) {
+ if (_vm->getMacTicks() - _movie->_lastTimeOut >= _movie->_timeOutLength) {
+ _movie->processEvent(kEventTimeout);
+ _movie->_lastTimeOut = _vm->getMacTicks();
+ }
+ }
+
if (!debugChannelSet(-1, kDebugFast)) {
// end update cycle if we're still waiting for the next frame
if (isWaitingForNextFrame()) {
@@ -852,13 +860,6 @@ void Score::update() {
}
// TODO Director 6 - another order
-
- // TODO: Figure out when exactly timeout events are processed
- if (_vm->getMacTicks() - _movie->_lastTimeOut >= _movie->_timeOutLength) {
- _movie->processEvent(kEventTimeout);
- _movie->_lastTimeOut = _vm->getMacTicks();
- }
-
}
void Score::renderFrame(uint16 frameId, RenderMode mode, bool sound1Changed, bool sound2Changed) {
More information about the Scummvm-git-logs
mailing list