fix(prompts): a control bound only on Input 2 shows that button's picture #485
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/upscaling
beanstalk: approved @ 1697603
beanstalk: approved @ 2c5a62e
beanstalk: approved @ 4fd82b7
beanstalk: approved @ 64d6d09
beanstalk: approved @ 6f91fae
beanstalk: approved @ 70a78f9
beanstalk: approved @ 8d361dc
beanstalk: approved @ 9d8356e
beanstalk: approved @ abf2227
beanstalk: approved @ d82f202
beanstalk: approved @ e5f1e40
beanstalk: approved @ ee8ab5f
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
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
testing wanted
ci: approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!485
Loading…
Reference in a new issue
No description provided.
Delete branch "jarynclouatre/Longshot:fix/prompt-input2-picture"
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?
Type: fix · Risk: low · Tested on: Linux x86-64 (game-free checks only) · Needs: none
Why
With Input 1 of a control cleared (Delete on the Controls page) and Input 2 set to another pad button, that button presses the control, but the game's prompt for it still shows the default button's picture.
current_bindsandcmap4_bindinhost/prompts.cread onlyhos_binding(HOS_BIND_PAD, b, 0). The input side uses both slots (bound_pad_buttonsinhost/nn_hid.c), and the keyboard face already falls back to the second slot (first_key).None filed. Found reading
host/prompts.cagainst the Controls page's two inputs.How to reproduce
Seen on: found reading the code; not seen in the game
Settings and switches: Xbox button prompts; A's Input 1 cleared and Input 2 bound to LB.
Steps: On the Controls page, clear A's Input 1 with Delete, bind A's Input 2 to LB, and look at the prompts for A.
Expected: The prompts for A show LB, which presses A.
Actual: The prompts for A show B, which no longer presses A. The same happens on every face.
What changed
Button pictures now use Input 2 when Input 1 is clear. Changes to that second input also reach the textures and the live check.
host/prompts.c): a newfirst_pad(b)next tofirst_keyreturns Input 1's pad input, or Input 2's when Input 1 is clear.current_bindsandcmap4_binduse it. A control with both inputs still shows Input 1's picture, a paddle still shows the default's icon, and a control with no pad input keeps today's picture. Since the snapshot fromcurrent_bindsnow follows Input 2, a change to a sole Input 2 while the game runs also reaches the textures and the live check.tests/test_prompt_font_bind.py): the stand-inhos_bindingnow has both slots; the left stick's click is bound on Input 2 only and the right stick's on both. The text-code check now builds its controls with the realcurrent_bindsover the same stand-in, and a new check compares that snapshot with what the inputs show.Measurements
Verdict: the changed test fails with main's Input 1-only behaviour and passes here; the suite has no new failures.
Hardware: none used (game-free checks on a Linux x86-64 PC, gcc 15.2, Python 3.14)
Scene: none, the game was not run
Method: 2026-11-14.
python3 -I -B tests/run_all.py --jobs 4, two runs each (main twice, then the branches of this batch in turn, twice). The changed test also ran withfirst_padreading Input 1 only (main's behaviour). Branch:fix/prompt-input2-picture.How to reproduce: the commands above in a checkout of each commit
9c9d69ed6894f0ectests/run_all.py(run 1, run 2)test_bake_portability.py,test_walk_key.pytests/test_prompt_font_bind.pyFAIL: face 0: 3 buttons bound, not 4with Input 1 read onlytest_bake_portability.pyfails here for a missing Python module (zstandard).test_walk_key.py's fixture doesn't link on main (undefined reference to hos_oot_autoload_input).Flags and settings
None.
Testing
Tested: the game-free suite on a Linux PC, as in Measurements; the test compiles
first_key,first_pad,current_binds,cmap4_bindandtext_codefromhost/prompts.cwith gcc.host/prompts.ccompiles (-fsyntax-only -Wall -Wextra) with llvm-mingw 20261104's x86_64-w64-mingw32-clang with no warnings, and whole with gcc intests/test_mods_size_table.py's fixture.Not tested: the game. A look at the prompts after binding a control on Input 2 only would show it.
Must be tested: None.
Risks
What could break: Only a control whose Input 1 is clear and Input 2 is set shows something new.
Turning it off: Reverting the commit puts the Input 1-only reading back.
Compatibility: Nothing changes for saves or
longshot_options.ini; only such a control's prompt picture differs.Checklist
Everyone
type(scope): description) of the status line's type.main.python -I -B tests/run_all.pypasses (any failure that also fails onmainis named).third_party/untouched (a new folder with aPROVENANCE.mdinstead).When it applies
mainand passing here.tests/that reads changed source updated in this PR, not weakened.WIP: fix(prompts): a control bound only on Input 2 shows that button's pictureto fix(prompts): a control bound only on Input 2 shows that button's pictureView command line instructions
Checkout
From your project repository, check out a new branch and test the changes.