Fake input: keep last-known-good snapshot instead of a fabricated 0#586
Open
Xnick417x wants to merge 3 commits into
Open
Fake input: keep last-known-good snapshot instead of a fabricated 0#586Xnick417x wants to merge 3 commits into
Xnick417x wants to merge 3 commits into
Conversation
…tral keyframe The seqlock snapshot reader gave up after 8 non-yielding spins and returned all-zeros, which capture_keyframe then streamed to the guest as a full neutral controller state — a one-frame input drop under contention (worst with on-screen touch controls). read_snapshot now spins up to 128 attempts with a yield hint on each retry and reports success/failure; on a failed read capture_keyframe keeps the previous keyframe instead of publishing zeros. Reader-side only; ring layout and protocol unchanged.
Touch: recover ScreenTouchStick when its pointer is captured by a control it drifted onto or is no longer down; reconcile from the controls view on every event so a missed or unforwarded UP no longer strands the right stick. Reader: on ring overflow only arm a keyframe from a fresh snapshot. A fresh keyframe now discards the surviving ring window so an older push can't overwrite a newer release, and a failed snapshot read replays the window instead of re-asserting a stale absolute frame.
On ring overflow the reader dropped the surviving window by default, so while a keyframe was mid-stream it discarded fresh delta events without refreshing the full state. A quiet axis whose last event had aged out of the window then stayed pinned to the stale keyframe value until the flooding axis stopped. Replay the window by default and drop it only when a fresh full keyframe (a true superset) was captured this call.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The seqlock snapshot reader gave up after 8 non-yielding spins and returned all-zeros, which capture_keyframe then streamed to the guest as a full neutral controller state — a one-frame input drop under contention (worst with on-screen touch controls). read_snapshot now spins up to 128 attempts with a yield hint on each retry and reports success/failure; on a failed read capture_keyframe keeps the previous keyframe instead of publishing zeros. Reader-side only; ring layout and protocol unchanged.