feat(input): Mouse camera Off, for playing without the mouse #178
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/upscaling
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/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
testing wanted
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!178
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/Longshot:feat/mouse-off"
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?
Why
There is no way to keep the mouse out of play. A stray click captures it, and from then on it turns the camera and its buttons press game buttons. Players on a controller or on the keyboard alone want it off.
What changed
mouse_camera=2(gpu/vk/vk_menu.cpp:tx_mousecam,hn_mousecam, the row's range 0 to 2).mouse_capture()inhost/display.crefuses to capture while option 6 is 2. A click doesn't capture, and a capture held before the Insert menu opened isn't taken back when it closes.mouse_capture()inhost/posix/display_sdl.c.host/nn_hid.c,npad_statestreats only 1 as native mouse look and only 0 as As the stick, so Off feeds no motion.native_on()inhost/mouse_native.ctreats only 1 as native. Before, any value but 0 counted as native.mouse_camerarow indocs/development.md, and the comments for option 6 invk_api.handvk_menu.h.Flags and settings
mouse_camera=2)Measurements
main:
c67cd4a0(2026-11-13)this PR: feat/mouse-off @
a42c0e14Hardware: not measured yet
Scene: not measured yet
Method: not measured yet. This is an input option with no expected cost: one option read when a click would capture the mouse
How to reproduce: Insert → Controls → Mouse camera → Off, then click in the window
c67cd4a0a42c0e14Testing
Tested: nothing yet. Not built, the checks not run, not run in the game.
Not tested:
tests/that readvk_menu.cpp,nn_hid.c,display.candmouse_native.cmay need updating for the new lines.game_menu_press) still take clicks with Off. That is left as it is on purpose: the mouse isn't captured there.Needs other testers:
Screenshots
Not taken yet (the Controls row with Off).
Risk and rollback
With Off chosen, the mouse can't be captured until the row is set back. Players who chose Off by mistake set it back in the Insert menu, which takes clicks without a capture. Reverting the commit is enough.
Reviewer notes
HOS_MOUSE_NATIVEstill overrides the row as before (0 or 1 only).Issues
None
Checklist
For everyone
type(scope): description).main.python -I -B tests/run_all.pyrun and passing (any failure that also fails onmainis named above). Not run yet.third_party/untouched (a new folder with aPROVENANCE.mdinstead).If applicable
Assisted-by:/Co-Authored-By:trailers.tests/that reads changed source updated in this PR, not weakened. Not checked yet.🤖 Generated with Claude Code
WIP: feat(input): Mouse camera Off, for playing without the mouseto feat(input): Mouse camera Off, for playing without the mouseTested after merge (no test request was open for it): mixed. The feature works on Linux, but the PR breaks one check,
tests/test_display_pointer.py, which still fails on main.Hardware: AMD Radeon RX 580 (8 GB, RADV Polaris10), Mesa 26.2.6, CachyOS (kernel 7.3.3), KDE Plasma 6 (KWin 6.8.2) on Wayland, SDL3. Built:
a42c0e14(the PR head) withmake_game.py(RX_HOT_OPT=O1, a development build; the game started withRX_VK_PRECOMPILE=0). Not run on Windows.In the game (Linux, SDL window on Wayland)
Clicks and pointer motion were sent through KWin's fake-input protocol, and the cursor's position was read back from KWin. A captured mouse is locked, so the cursor stays where it was clicked. Each run was a fresh start at the title screen: the pointer was moved to the window's middle (1280,705), clicked 3 times, then moved by +200,+100.
mouse_camera=2)mouse_camera=1)mouse_camera=0)RX_VK_MENU_SCRIPT)mouse_camera=2, and its hint shows (screenshot below).mouse native: onis logged only in the runs that used Native.Checks
python -I -B tests/run_all.pyata42c0e14: 516 passed, 1 failed, 19 skipped (Linux).tests/test_display_pointer.pyfails to link. Its fixture compileshost/posix/display_sdl.c'smouse_capture(), which now callsrx_option(), and the fixture has no stub for it:It passes on the PR's base,
c67cd4a0, and fails the same way on current main (000f19fb). The fix is anrx_optionstub in the test's fixture (returning 0, or a settable value to cover Off as well).