diff options
| author | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-26 13:17:06 -0500 |
|---|---|---|
| committer | Jan Trencansky <jan.trencansky@protonmail.com> | 2026-11-26 13:17:06 -0500 |
| commit | 657808a7df4d7f1ea636d29dda8127ec65575f1b (patch) | |
| tree | ec874c8efd8f70e4c78e49269083573c38958b82 /runtime/test/vk_queue_query_sync_test.cpp | |
| parent | 48f87a9c9bea054b0072364ebf0e51e2d59f354d (diff) | |
gameinput (no SDL3): take the script's changes between two reads at their own time instead of a clock thread (maintainer fix on #2372)
#2372 started a detached thread that took the input lock every 8 ms, so that a scripted press that begins and ends
while the title is not reading reaches the reading history. That works around the cause and adds its own: the
history then depends on how the host schedules a Sleep(8) thread (a slow or loaded machine keeps fewer edges, and a
Windows timer tick of 15.6 ms drops a short hold), the thread never ends, and it contends with the title's reads.
The cause is that update() looked only at the state at the moment of the read. It now first adds a reading for every
start and end of a press since the last update, stamped with the script's time, then the state at the read: the
history is the same however often the title reads, on any machine, and no thread runs. The press log lines carry the
script's time of the press.
Also: LEONIDA_INPUT_TRACE (added by #2372) is documented in docs/gameinput.md and runtime/README.md, as
tests/test_docs_env_vars.py requires. gameinput_no_sdl_script gains y@10, which the title never reads while it is down
(reads at 4.5 s and 60 s): the press and its release must be in the history with their own timestamps. On main the
history has no Y reading.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/test/vk_queue_query_sync_test.cpp')
0 files changed, 0 insertions, 0 deletions