upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/src/active_input.h
AgeCommit message (Collapse)Author
11 daysactive_input: guard timestamp underflow in debounce and ignore non-finite axesNarek Shaghoyan
13 daysgameinput: track which kind of device the player used lastICUMADETHIS
The shim tells the title every pad is an Xbox One pad, so nothing could say what the player is really holding. rt::gameinput::active_input() now returns the family of the device used last (Xbox, PlayStation 5, PlayStation 4, PlayStation 3, Nintendo, or the keyboard pad), a generation that counts changes, and whether LEONIDA_PROMPTS forced it. It is groundwork for button prompts that follow the device in use. Only deliberate input counts: a button going down, a trigger past 0.3 or a stick leaving a 0.35 radius. Held input, stick drift and noise do not; a pad's first reading after it connects is its baseline; and after a change the next one waits LEONIDA_PROMPTS_SWITCH_MS (300 ms). The rules live in runtime/src/active_input.h with no SDL, tested by active_input_test; gameinput_test drives them on SDL virtual pads. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>