Idea: mod API: the pad as the game was given it (taps and recordings in), for mods and engine callbacks #2641
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/mods
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot#2641
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?
The idea
A mod API read of the pad as the game was given it: the buttons the game's last controller read handed it, the
player's input with the host's taps and the input recordings in (the host already keeps it,
hos_hid_buttonsinhost/nn_hid.c, written at each read; the cheats use it for their button conditions).What the API has today reads the player's controller before any mod (
host_sys::input::pad_read,hos_pad_last) orpresses for the game (
input.press). Neither says what the game itself saw, which is what a mod reacting to a buttoninside the game's own screens needs: a tap from the menus' mouse (a click on a prompt taps its button), a
recording's press, or the player's, as one.
Proposed:
host_sys::input::buttons_given() -> u64(HidNpadButton bits), any thread, one relaxed load: usable from anengine callback on a worker thread, where no API service reaches;
input.given()(the API's button order), at the frame's serial point;input.read).Anything else
First user: the save slots system mod on
mod-api(branchfeat/save-slots-mod, not yet a PR) reads X and B whilethe game's save list waits, at an engine callback on the button wait's request; X must also come from a click on its
prompt, which taps X. It binds
hos_hid_buttonsinhost-sys(with a settable fake) for now; this issue is to makethat a public part of the API rather than one mod's binding.
Prior work: none found (searched
hid_buttons,buttons given,pad state).Possibly related, for context: