mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:50:52 +01:00
[PR #1510] gameinput: report a missed press once to a slow reader (RT-GAMEINPUT-SLOW-READER) #1539
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#1539
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/1510
Author: @QemmHD
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:claude/gameinput-slow-reader📝 Commits (2)
0e5e33bgameinput: report a missed press once to a slow reader (RT-GAMEINPUT-SLOW-READER)045bb0fgameinput_test: close_pad resets a missed press, pads keep their own, wider slow-reader margin📊 Changes
2 files changed (+97 additions, -0 deletions)
View changed files
📝
runtime/shims/gameinput.cpp(+32 -0)📝
runtime/test/gameinput_test.cpp(+65 -0)📄 Description
Claimed in the coordination issue as: RT-GAMEINPUT-SLOW-READER (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7151130854)
Carries DadaCap's
kSlowReaderUsfrom theirboot-prototypebranch (commit fa497b930), with DadaCap's authorship and date kept, as agreed in #14 (comment 7151032887).What and why
The title reads each pad with
GetCurrentReadingonce a frame. At a few frames a second, a press can start and end between two reads, so it's lost. That's why the first-run pages need several presses to advance at low frame rates (#233 fills the history, which the title doesn't read). Each pad now remembers the newest reading that pressed a button the last read didn't report. A read that comes more thankSlowReaderUs(50 ms) after the previous one is given that press once, and the next read gets the pad's real state.close_padclears it.Scope: only the GameInput part of fa497b930 (
runtime/shims/gameinput.cpp+32,runtime/test/gameinput_test.cpp+16), unchanged apart from line positions. The prototype's other changes in that commit aren't included. It doesn't conflict with #1074'sLEONIDA_INPUT_SCRIPT: scripted presses go through the same path, so a short scripted press now also reaches a slow reader.Tested
Windows 11, RTX 4070 SUPER (NVIDIA 621.24), VS 2022 + Ninja, RelWithDebInfo, on main
2213d5cb8:gameinput,gameinput_hostandgameinput_scriptpass, both plain and withLEONIDA_VK_VALIDATION=1.gameinput_testruns 365 checks with 0 failures, including "a slow reader sees a missed press once".test_runtime_paths, which is red on main since #939 (tools/conformance/**missing inruntime.yml; reported on #939). That's unrelated to this PR.GPUs tested: NVIDIA GeForce RTX 4070 SUPER, driver 621.24, Windows 11
AI-assisted: yes
Checklist
mainand merges cleanly.docs/design.md. (n/a)AI-assisted (Claude Code, Claude Opus 5.5).
🤖 Generated with Claude Code
https://claude.ai/code/session_01SR1Fv7eQNgZjM6miWPKjHf
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.