Skip to content

[DO NOT MERGE - TEST ONLY] fix(pad): miss-tolerant hold-repeat + live miss counters (#340) - #355

Draft
NathanNeurotic wants to merge 3 commits into
masterfrom
fix/340-pad-miss-pause
Draft

[DO NOT MERGE - TEST ONLY] fix(pad): miss-tolerant hold-repeat + live miss counters (#340)#355
NathanNeurotic wants to merge 3 commits into
masterfrom
fix/340-pad-miss-pause

Conversation

@NathanNeurotic

Copy link
Copy Markdown
Owner

TEST BUILD A of 3 — do not merge. If this candidate wins, a clean PR will replace it.

What this tests (Layer 2: the amplifier)

OPL's repeat engine resets a held key's countdown to 3x the initial delay (300–1500 ms) on any frame the key reads unpressed — including pad-read MISS frames where the key didn't read at all. On real HW, recurring misses starve auto-repeat entirely: the hangs on the 3rd highlighted item pattern. This branch pauses the countdown while a missing pad's carried sample still holds the key (per-pad accounting — a second pad or a PADEMU DS4 can't mask it), and re-wires the Debug HUD miss counters, which have had no writers since the PR #328 revert (the HUD always showed miss:0).

This restores the hold-repeat behavior the tester validated at Beta-3442 ("the list now repeat smoothly with no lag", #271 2026-07-28) which PR #328 reverted. Uses stock sio2man — misses still happen; they just stop costing 300–1500 ms each.

Also removes the dead Left Stick Navigation toggle (never wired at either end; Sensitivity Off = 128 deadzone is the real per-axis control).

Tester instructions (zackcage6)

  1. Hold-scroll: hold D-pad Down for 60+ s through the game list AND a settings page. Expected: steady repeat, micro-hitches at worst, never a 0.3–1.5 s freeze; releasing always stops within one step. Falsified if the 3rd-item hang is still there.
  2. Miss HUD: Settings → Debug Colors ON. Navigate hard; read the PAD miss:X brst:Y/Z line (bottom of screen, also in settings dialogs). Any climbing miss count during a hitch = the root-cause premise confirmed on HW — screenshot it. If it hangs with miss:0, the premise is wrong and we regroup.
  3. Phantom confirms: should be rarer but may not vanish (the disconnect-flap path needs the sio2man-side fix, PR B).

Relationship to the other test PRs

  • B feat/340-sio2man-priority-ceiling: fixes the cause of the misses (SDK-side), counters only — no pause.
  • C test/340-sio2man-2023-swap: KrahJohlito's confirmation build (2023 threaded sio2man, diagnostic only).

Test each separately for clean data.

🤖 Generated with Claude Code

NathanNeurotic and others added 3 commits August 3, 2026 16:11
…ss counters (#340)

A pad-read MISS (connected pad, no fresh sample this poll) leaves the held
buttons out of global paddata for the frame while edgedata still carries the
last valid sample. The baseline repeat loop treated that as a release and
re-armed the full 3x initial delay (300-1500 ms depending on scroll speed),
so recurring misses on real hardware starved auto-repeat entirely -- the
'hangs on the 3rd highlighted item' pattern in #340/#272. Pause the countdown
for keys whose edgedata bit survives a miss poll instead; a key genuinely
released during a blind window still resets on the first good read, and an
emulator (which never misses) sees byte-for-byte baseline behavior. This
restores the hold-repeat feel HW-validated at Beta-3442 and lost in the
PR #328 revert.

Also: readMisses/missBurst/missBurstMax had no writers since that revert
(the Debug HUD always rendered miss:0) -- count them again, and treat a
miss poll with a carried held sample as input activity so the 250-600 ms
inline initializePad self-heal cannot fire mid-navigation off misses that
masked the user's own presses.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
fafc14d shipped the toggle with no reader anywhere -- readLeftJoy never
checked gEnableAnalogNav and guiShowControllerConfig never synced the
dialog row, so the checkbox always rendered off and its edits went
nowhere. Stick sensitivity already carries the real control: Off maps to
a 128 deadzone which fully gates an axis out of d-pad navigation, per
axis. Remove the dead row, enum id, global, and config key rather than
wiring a redundant switch.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The first cut decided 'miss' per poll: any pad producing a fresh sample
masked another pad's miss, so with two pads -- or a PADEMU ds34 alongside
a native pad, exactly the USB-heavy setup that starves SIO2 the most --
the pause never engaged and the HUD counted nothing. Track the held bits
of each ready pad that produced no sample (pollMissedHeld) and drive the
repeat pause, the activity stamp, and the miss counters from that. Also
drop a carried sample once nothing supplies its port any more (a ds34
pad that stopped reporting), so a stale press cannot pin the repeat
pause or the self-heal idle gate open forever.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: f0834757-9fd7-4f2b-b52c-0766a770525c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant