fix(input): the Disable camera centering row's function is back, and the game links again #2630

Open
notquiteog wants to merge 1 commit from notquiteog/fix/camera-centering-link into main
notquiteog commented 2026-11-12 03:29:24 +00:00 (Migrated from github.com)

main does not link since #2617: ld.lld: error: undefined symbol: hos_disable_camera_centering.

Why: #2617 took hos_disable_camera_centering out of host/mouse_native.c with the lines around it, but the game's patched camera branch still calls it (nx2/oot_patches.py, CAM_FOLLOW_HOOK), and the Controls tab still has the row (option 45).

What changed: the function is back as it was, three lines.

Tested: nx2/make_game.py on Linux x86-64 stops at the link before and makes the game after (with the Linux build fix of vk_texture.cpp, the other pull request, which main also needs).

🤖 Generated with Claude Code

`main` does not link since #2617: `ld.lld: error: undefined symbol: hos_disable_camera_centering`. **Why:** #2617 took `hos_disable_camera_centering` out of `host/mouse_native.c` with the lines around it, but the game's patched camera branch still calls it (`nx2/oot_patches.py`, `CAM_FOLLOW_HOOK`), and the Controls tab still has the row (option 45). **What changed:** the function is back as it was, three lines. **Tested:** `nx2/make_game.py` on Linux x86-64 stops at the link before and makes the game after (with the Linux build fix of `vk_texture.cpp`, the other pull request, which `main` also needs). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Owner

@Joey-Magnus reviewed on GitHub · 2026-11-12 14:33 UTC · original

Thanks for catching the link failure. It was fixed on main by #2632 (a016b7a6, "fix: main links again: hos_disable_camera_centering is back in host/mouse_native.c"). The function is at host/mouse_native.c:100 with the same body: return rx_option(45, 0). The CAM_FOLLOW_HOOK patch in nx2/oot_patches.py calls it as before.
#2632 also added tests/test_patch_hooks_defined.py. It checks that every function the game's patches call is defined somewhere in host/ or gpu/vk/, so the same kind of removal now fails CI instead of the link.
If this were merged now, it would put in a second definition of hos_disable_camera_centering in the same file and break the build again. GitHub can't see that, because the two hunks don't overlap. I'd suggest closing this as superseded by #2632.

> [@Joey-Magnus](https://github.com/Joey-Magnus) reviewed on GitHub · 2026-11-12 14:33 UTC · [original](https://github.com/NotRexed/Hookshot/pull/2630#pullrequestreview-5876225178) Thanks for catching the link failure. It was fixed on main by #2632 (a016b7a6, "fix: main links again: hos_disable_camera_centering is back in host/mouse_native.c"). The function is at host/mouse_native.c:100 with the same body: return rx_option(45, 0). The CAM_FOLLOW_HOOK patch in nx2/oot_patches.py calls it as before. #2632 also added tests/test_patch_hooks_defined.py. It checks that every function the game's patches call is defined somewhere in host/ or gpu/vk/, so the same kind of removal now fails CI instead of the link. If this were merged now, it would put in a second definition of hos_disable_camera_centering in the same file and break the build again. GitHub can't see that, because the two hunks don't overlap. I'd suggest closing this as superseded by #2632. <!-- github-sync:r:5876225178 -->
Owner

@hckrman101 reviewed on GitHub · 2026-11-12 16:31 UTC · original

Thanks for chasing the link failure down, and for describing it so clearly.

I agree with Joey-Magnus's review: this is already fixed on main. #2632 (a016b7a6) put hos_disable_camera_centering back in host/mouse_native.c with the same body, return rx_option(45, 0). I checked main and it is defined at line 100. It also added tests/test_patch_hooks_defined.py, which fails when a function the game's patches call is not defined in host/ or gpu/vk/. That answers the "what keeps the row from breaking again" question. This PR adds no test of its own.

  • Cause: #2617 removed the function with the lines around it, as the description says. The restored function is the same as the one #2632 restored.
  • Merging as is: GitHub shows no conflict because the hunks don't overlap, but the branch is 31 commits behind main. It would add a second definition of the same function in the same file and break the link again with a duplicate symbol.
  • CI: the 5 failures (4 Python source check jobs and the appimage job) are not caused by this change. It only adds a one-line C function, and the failing tests include ones like test_wayland_libdecor_hint.py that are nowhere near it. They come from the state of main when this branch was cut, before the fixes that have since landed. The branch is 31 commits behind, so merging main would rerun CI on current code. There is nothing left to rerun CI for, though, because the PR itself is no longer needed.
  • Evidence: the description says the game builds on Linux x86-64, but there is no in-game check that the Controls row (option 45) works. That would only matter if the PR still had a purpose.

So I'd close this as superseded by #2632. Thanks again for the quick catch.

> [@hckrman101](https://github.com/hckrman101) reviewed on GitHub · 2026-11-12 16:31 UTC · [original](https://github.com/NotRexed/Hookshot/pull/2630#pullrequestreview-5878185857) Thanks for chasing the link failure down, and for describing it so clearly. I agree with Joey-Magnus's review: this is already fixed on main. #2632 (a016b7a6) put `hos_disable_camera_centering` back in `host/mouse_native.c` with the same body, `return rx_option(45, 0)`. I checked main and it is defined at line 100. It also added `tests/test_patch_hooks_defined.py`, which fails when a function the game's patches call is not defined in `host/` or `gpu/vk/`. That answers the "what keeps the row from breaking again" question. This PR adds no test of its own. - **Cause:** #2617 removed the function with the lines around it, as the description says. The restored function is the same as the one #2632 restored. - **Merging as is:** GitHub shows no conflict because the hunks don't overlap, but the branch is 31 commits behind main. It would add a second definition of the same function in the same file and break the link again with a duplicate symbol. - **CI:** the 5 failures (4 Python source check jobs and the appimage job) are not caused by this change. It only adds a one-line C function, and the failing tests include ones like `test_wayland_libdecor_hint.py` that are nowhere near it. They come from the state of main when this branch was cut, before the fixes that have since landed. The branch is 31 commits behind, so merging main would rerun CI on current code. There is nothing left to rerun CI for, though, because the PR itself is no longer needed. - **Evidence:** the description says the game builds on Linux x86-64, but there is no in-game check that the Controls row (option 45) works. That would only matter if the PR still had a purpose. So I'd close this as superseded by #2632. Thanks again for the quick catch. <!-- github-sync:r:5878185857 -->
Commenting is not possible because the repository is archived.
No description provided.