test(input): the side buttons' mask check reads only the UI page's pointer (#3226) #3262
No reviewers
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
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!3262
Loading…
Reference in a new issue
No description provided.
Delete branch "cuecuemoar/Longshot:fix/display-pointer-mask-check"
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?
Summary
tests/test_display_pointer.pyfails onmainsince #3257 (efdebddbd):FAIL: gpu/vk/vk_ui.cpp passes the pointer's buttons on without the side buttons. My check from #3257 asked every line ofgpu/vk/vk_ui.cppthat setsin.buttons,in.pressedorin.releasedfrom a pointer forMKW_UI_BUTTONS.2500534d8(merged just before #3257) added a modal game screen's own read,in.pressed = ptr.pressed & 7u; // (a right click: the game's), which is not the UI page's pointer and keeps its mask on purpose. That line made the check fail.The check now reads only the UI page's pointer: each line that gives
in.buttonsa pointer's held buttons (the pop-out window's and the game window's), thein.pressedline right after each, andin.released. Nothing invk_ui.cppchanges.Read first:
tests/test_display_pointer.py, the#3226block before the fixture is compiled.Testing
Tested: test only, nothing the game runs. In WSL (Linux), with
env.sh's Python 3.12, first onmainb80297399; after the rebase ontomain3131b1ddc(which touched neither the check norvk_ui.cpp) the check was run again: it still fails onmainwith the same message and passes here:tests/test_display_pointer.pyfails onmain(the message above) and passes here, with g++ and clang.& 7uback in place ofMKW_UI_BUTTONSon any of the five lines it reads (vk_ui.cpp734, 735, 749, 750, 754) still fails it, so #3257's protection stays. The modal screen's line 720 is left as it is.test_menu_hit,test_screensaver,test_cursor_hidden_in_play,test_input_backgroundandtest_ui_rendererpass onmainand are not touched.Still to test:
Measurements
Nothing to measure: a check under
tests/only.Risks
None for players: no game code changes. The check reads fewer lines, but every line that #3257's mask goes through is still checked.
Checklist
Ready for review
main; the title is a Conventional Commit.mise run testpasses (any failure that also fails onmainis named).main, or Measurements says why there is nothing to measure.third_party/untouched; nothing GPL-incompatible.When it applies
tests/that reads changed source is updated, not weakened.Assisted-by:/Co-Authored-By:trailers.Ready to merge
main, measured again or a comment says why the numbers still hold.🤖 Generated with Claude Code
https://claude.ai/code/session_01VxeaZi9Np8FcHAzJs2LM9d
310aa7e45b5708e7da955708e7da956303a59db6Rebased onto main
3131b1ddc: head6303a59db(the same single test commit; main did not touch tests/test_display_pointer.py or gpu/vk/vk_ui.cpp sinceb80297399). Conflicts: none. Linux (WSL, env.sh's Python 3.12): tests/test_display_pointer.py passes on6303a59db; with main's copy of the check it still fails on3131b1ddcwith the same message (the modal screen'sin.pressed = ptr.pressed & 7uline). Test only, nothing the game runs: no game run, no host-compile or suite rerun needed beyond that file.