test(input): the side buttons' mask check reads only the UI page's pointer (#3226) #3262

Merged
HumanBean merged 1 commit from cuecuemoar/Longshot:fix/display-pointer-mask-check into main 2026-12-05 17:31:59 +00:00
Contributor

Summary

tests/test_display_pointer.py fails on main since #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 of gpu/vk/vk_ui.cpp that sets in.buttons, in.pressed or in.released from a pointer for MKW_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.buttons a pointer's held buttons (the pop-out window's and the game window's), the in.pressed line right after each, and in.released. Nothing in vk_ui.cpp changes.

Read first: tests/test_display_pointer.py, the #3226 block before the fixture is compiled.

Testing

Tested: test only, nothing the game runs. In WSL (Linux), with env.sh's Python 3.12, first on main b80297399; after the rebase onto main 3131b1ddc (which touched neither the check nor vk_ui.cpp) the check was run again: it still fails on main with the same message and passes here:

  • tests/test_display_pointer.py fails on main (the message above) and passes here, with g++ and clang.
  • Putting & 7u back in place of MKW_UI_BUTTONS on any of the five lines it reads (vk_ui.cpp 734, 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_background and test_ui_renderer pass on main and are not touched.

Still to test:

  • None.

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

  • One topic, on current main; the title is a Conventional Commit.
  • Tested on my own PC, in the game for a change the game runs, as Testing says.
  • mise run test passes (any failure that also fails on main is named).
  • Measured against main, or Measurements says why there is nothing to measure.
  • No game files, build output or hand-edited generated files; third_party/ untouched; nothing GPL-incompatible.

When it applies

  • A check under tests/ that reads changed source is updated, not weakened.
  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.

Ready to merge

  • Everything in Still to test has run, its results in Tested.
  • Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers").
  • Approved in review, every comment answered.
  • CI passes on the head; on current main, measured again or a comment says why the numbers still hold.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VxeaZi9Np8FcHAzJs2LM9d

## Summary `tests/test_display_pointer.py` fails on `main` since #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 of `gpu/vk/vk_ui.cpp` that sets `in.buttons`, `in.pressed` or `in.released` from a pointer for `MKW_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.buttons` a pointer's held buttons (the pop-out window's and the game window's), the `in.pressed` line right after each, and `in.released`. Nothing in `vk_ui.cpp` changes. Read first: `tests/test_display_pointer.py`, the `#3226` block before the fixture is compiled. ## Testing **Tested:** test only, nothing the game runs. In WSL (Linux), with `env.sh`'s Python 3.12, first on `main` b80297399; after the rebase onto `main` 3131b1ddc (which touched neither the check nor `vk_ui.cpp`) the check was run again: it still fails on `main` with the same message and passes here: - `tests/test_display_pointer.py` fails on `main` (the message above) and passes here, with g++ and clang. - Putting `& 7u` back in place of `MKW_UI_BUTTONS` on any of the five lines it reads (`vk_ui.cpp` 734, 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_background` and `test_ui_renderer` pass on `main` and are not touched. **Still to test:** - None. ## 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 - [x] One topic, on current `main`; the title is a Conventional Commit. - [x] Tested on my own PC, in the game for a change the game runs, as Testing says. - [x] `mise run test` passes (any failure that also fails on `main` is named). - [x] Measured against `main`, or Measurements says why there is nothing to measure. - [x] No game files, build output or hand-edited generated files; `third_party/` untouched; nothing GPL-incompatible. ### When it applies - [x] A check under `tests/` that reads changed source is updated, not weakened. - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. ### Ready to merge - [ ] Everything in Still to test has run, its results in Tested. - [ ] Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers"). - [ ] Approved in review, every comment answered. - [ ] CI passes on the head; on current `main`, measured again or a comment says why the numbers still hold. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01VxeaZi9Np8FcHAzJs2LM9d
test(input): the side buttons' mask check reads the UI page's pointer only, as main has a modal screen's right click too (#3226)
Some checks failed
PR description / Title and description (pull_request_target) Has been cancelled
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
310aa7e45b
#3257's check in test_display_pointer.py asked every line of gpu/vk/vk_ui.cpp that sets in.buttons, in.pressed or
in.released from a pointer for MKW_UI_BUTTONS. 2500534d8 (merged before it) added a modal game screen's read,
`in.pressed = ptr.pressed & 7u` (a right click: the game's), so main fails the check since efdebddbd. The check now
reads the UI page's pointer: each line giving in.buttons a pointer's held buttons, the in.pressed line after it, and
in.released. Putting & 7u back on any of those five still fails it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VxeaZi9Np8FcHAzJs2LM9d
cuecuemoar force-pushed fix/display-pointer-mask-check from 310aa7e45b
Some checks failed
PR description / Title and description (pull_request_target) Has been cancelled
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
to 5708e7da95
Some checks failed
PR description / Title and description (pull_request_target) Has been cancelled
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
2026-12-05 17:19:05 +00:00
Compare
cuecuemoar force-pushed fix/display-pointer-mask-check from 5708e7da95
Some checks failed
PR description / Title and description (pull_request_target) Has been cancelled
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Has been cancelled
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
to 6303a59db6
Some checks are pending
CI / What the change needs (pull_request) Blocked by required conditions
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Blocked by required conditions
CI / Third-party parts and guide screenshots (pull_request) Blocked by required conditions
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Blocked by required conditions
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Blocked by required conditions
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Blocked by required conditions
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Blocked by required conditions
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Blocked by required conditions
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Blocked by required conditions
CI / Website build and checks (pull_request) Blocked by required conditions
PR description / Title and description (pull_request_target) Successful in 5s
2026-12-05 17:31:27 +00:00
Compare
Author
Contributor

Rebased onto main 3131b1ddc: head 6303a59db (the same single test commit; main did not touch tests/test_display_pointer.py or gpu/vk/vk_ui.cpp since b80297399). Conflicts: none. Linux (WSL, env.sh's Python 3.12): tests/test_display_pointer.py passes on 6303a59db; with main's copy of the check it still fails on 3131b1ddc with the same message (the modal screen's in.pressed = ptr.pressed & 7u line). Test only, nothing the game runs: no game run, no host-compile or suite rerun needed beyond that file.

Rebased onto main 3131b1ddc: head 6303a59db (the same single test commit; main did not touch tests/test_display_pointer.py or gpu/vk/vk_ui.cpp since b80297399). Conflicts: none. Linux (WSL, env.sh's Python 3.12): tests/test_display_pointer.py passes on 6303a59db; with main's copy of the check it still fails on 3131b1ddc with the same message (the modal screen's `in.pressed = ptr.pressed & 7u` line). Test only, nothing the game runs: no game run, no host-compile or suite rerun needed beyond that file.
HumanBean deleted branch fix/display-pointer-mask-check 2026-12-05 17:32:00 +00:00
Some checks are pending
CI / What the change needs (pull_request) Blocked by required conditions
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Blocked by required conditions
CI / Third-party parts and guide screenshots (pull_request) Blocked by required conditions
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Blocked by required conditions
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Blocked by required conditions
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Blocked by required conditions
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Blocked by required conditions
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Blocked by required conditions
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Blocked by required conditions
CI / Website build and checks (pull_request) Blocked by required conditions
PR description / Title and description (pull_request_target) Successful in 5s
Some workflows are waiting to be reviewed.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot!3262
No description provided.