Skip to content

Linux: the OoT debug tools (cheats, teleport, flight, free view) - #1292

Merged
hckrman101 merged 1 commit into
NotRexed:mainfrom
Joey-Magnus:linux/debug-tools
Nov 9, 2026
Merged

hckrman101 merged 1 commit into
NotRexed:mainfrom
Joey-Magnus:linux/debug-tools

Conversation

@Joey-Magnus

Copy link
Copy Markdown
Contributor

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).

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

…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>
@hckrman101
hckrman101 merged commit 6b8a519 into NotRexed:main Nov 9, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant