Repository navigation
Linux: the OoT debug tools (cheats, teleport, flight, free view) - #1292
Merged
Merged
Conversation
…free view) The debug tools in host/hos_main.c (the Cheats page's actions, inventory, teleport, flight, lift and free view) were inside `#ifdef _WIN32`, so on Linux the Insert menu offered them and nothing happened. Everything they call exists on Linux too: host/posix provides the Windows calls they use. The eight blocks are now `#if defined(_WIN32) || defined(__linux__)`, and the HOS_OOT_PROTECT_HEARTS switch is read on every system instead of inside the Windows-only start-up block. Tested on an RTX 4070 Ti (NVIDIA 595.99.02, Ubuntu 26.04), headless runs with HOS_OOT_CHEATS=1 and the live input's "!cheat" action, from the same test save: - upstream main ac3bd44: "!cheat 1004" (Hyrule Castle) from Kakariko does nothing; no "cheats:" lines in the log. - this change: "!cheat 1002" (Kakariko Village) from the castle courtyard teleports there; the log has the cheats' inventory probe. tests/test_debug_tools_linux.py follows hos_main.c's preprocessor conditions to each debug tool and its body and checks they are compiled with _WIN32 and with __linux__ (on main it lists 14 lines that Linux does not compile). Assisted-by: Claude Opus 5.5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The debug tools in host/hos_main.c (the Cheats page's actions, inventory, teleport, flight, lift
and free view) were inside
#ifdef _WIN32, so on Linux the Insert menu offered them and nothinghappened. Everything they call exists on Linux too: host/posix provides the Windows calls they use.
The eight blocks are now
#if defined(_WIN32) || defined(__linux__), and the HOS_OOT_PROTECT_HEARTSswitch is read on every system instead of inside the Windows-only start-up block.
Tested on an RTX 4070 Ti (NVIDIA 595.99.02, Ubuntu 26.04), headless runs with HOS_OOT_CHEATS=1 and
the live input's "!cheat" action, from the same test save:
in the log.
the cheats' inventory probe.
tests/test_debug_tools_linux.py follows hos_main.c's preprocessor conditions to each debug tool and
its body and checks they are compiled with _WIN32 and with linux (on main it lists 14 lines that
Linux does not compile).
This also makes the readme's Cheats section (
HOS_OOT_CHEATS=1, Gameplay -> Cheats), which carries no Windows-only note, true on Linux.Assisted-by: Claude Opus 5.5
🤖 Generated with Claude Code