fix(input): reseed mouse look after camera handover #2653
No reviewers
Labels
No labels
accessibility
autorelease: pending
autorelease: tagged
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
question
testing wanted
wontfix
No milestone
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Hookshot!2653
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/mouse-camera-handover"
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?
What this is for: resume Native mouse look from the game's current camera angles after another camera takes over (current main CI). What is measured: the affected game-free check before and after, with GCC 16.2.1 and Clang 23.1.3 selected, plus one strict full-suite run, as recorded below. Not measured: a game run or Windows execution.
Cause
#2617 retains mouse target angles to prevent drift, but the existing inactive-state guard returns without invalidating that target; the pre-existing handover test then applies movement to old yaw 5 instead of current yaw 0 (
host/mouse_native.c:120-148,tests/test_mouse_native.py).The relevant failure in main's CI log is:
What changed
Clear
target_okwhen the player camera is inactive; keep immediate stick handback and persistent angles while active. Preserve the original failing yaw assertion, exercise changed pitch and yaw on return to both active states, and document the handover in the readme.How it was tested
Recorded on 2026-11-11, Linux kernel
7.2.15-1-omarchy, basede866017, head58c817f7(version and test records).a016b7a6: the affected check fails independently in both compiler environments with the diagnostic above; the branch passes independently in both (python -I -B tests/run_all.py --strict --jobs 1 tests/test_mouse_native.pyrecords).python -I -B tests/run_all.py --strict:456 passed, 14 failed, 20 skipped in 178 s (linux, 32 at once), load 33.42 → 81.38 (complete suite output).test_wayland_libdecor_hint.py,test_display_startup_failure.py,test_texel_buffer_ownership.py,test_audio_aux.py,test_audio_biquad.py,test_dlss_checks.py,test_env_on.py,test_framegen_preset.py,test_hdr_encode.py,test_linux_docker_packages.py,test_menu_i18n.py,test_mods_size_table.py,test_readback_part.py,test_rumble_menu.py(complete suite output). The companion fixture, capture-switch, PPA-parser and hint-catalog branches address their separate causes; #2614 owns the HDR check and is not duplicated here.Not tested / risks
The executable fixture runs the actual camera function against authored state, but no game, real mouse/controller, Windows or camera-transition playtest was run.
Overlaps
The inspected #2567 first-person changes and #2630 camera-centering restoration do not contain this handover fix and merge cleanly in the recorded comparison.
Assisted-by: GPT-6 Astra
Co-Authored-By: GPT-6 Astra [email protected]
Thanks, this is the right fix. I traced it on main: the free-look guard clears
target_okjust before the slingshot block, thestate(4)frame reseeds from yaw 5, and then the state-0 branch returned without dropping that target, so the first frame back turned from 5 instead of the game's 0 (yaw 4, the CI failure). Clearing it in the not-3/4 branch closes that.What I checked:
One thing for a follow-up, not this PR: the reseed only happens when the hook runs in another state. If the player camera's update stops running altogether (the pause menu, a scene load) and the camera comes back at the same address in state 3 with new angles,
target_okis still 1 and the old target gets written over them. I haven't checked in game whether that happens. If it does, the fix is just as small: reseed when the hook hasn't run withinLIVE_NS(readlast_hook_nsbefore it's overwritten).Python checks are still running; the rest is green.
github-sync referenced this pull request2026-11-12 06:22:54 +00:00