feat: Button icons menu row picks the ButtonPrompts set (PlayStation / Xbox / Steam Deck), Auto by controller #1471

Closed
NotRexed wants to merge 1 commit from button-icons into main
NotRexed commented 2026-11-10 04:12:36 +00:00 (Migrated from github.com)

Adds support for exgde/oot-switch2-button-prompts, which swaps the button icons and the Basic Controls picture for PlayStation, Xbox and Steam Deck ones.

These are RomFS mods, and Hookshot already loads them from mods/. Nothing of the mod ships with Hookshot: its files are edited game assets, so the player downloads them from the mod's own releases.

What this adds

  • Gameplay > Button icons: Auto, Switch, PlayStation, Xbox or Steam Deck. It applies after a restart.
  • Only the chosen set loads, and the other sets are left out, so all three can stay installed. Before this, all of them loaded and the one sorting last won.
  • How Auto chooses:
    • With one set installed, it uses that set.
    • Otherwise it uses the set for the controller used last. pad_sdl.c saves that controller's kind in hookshot_pad.txt, and on a Steam Deck, Steam's SteamDeck=1 picks the Steam Deck set.
    • A Switch controller keeps the game's own icons.
    • Failing all that, the set sorting last loads, as before.
  • Overrides: HOS_BUTTON_ICONS=auto|switch|playstation|xbox|steamdeck chooses for one run. The log names the set it loaded and each one it left out.
  • Fix: the menu's save dropped every line it doesn't write, such as a hand-written discord_app_id=. Those lines are kept now.

Tested

  • tests/test_button_icons.py: the choice logic in host/button_icons.h (folder names, SDL2 and SDL3 pad types, every pick case).
  • test_menu_restart, test_audio_output_menu, test_rumble_menu: pass.
  • mods.c and pad_sdl.c: clean with -Wall -Wextra (syntax check).
  • Not yet tested in the game with the mod installed. That's next, in the local test build.

🤖 Generated with Claude Code

Adds support for [exgde/oot-switch2-button-prompts](https://github.com/exgde/oot-switch2-button-prompts), which swaps the button icons and the Basic Controls picture for PlayStation, Xbox and Steam Deck ones. These are RomFS mods, and Hookshot already loads them from `mods/`. **Nothing of the mod ships with Hookshot:** its files are edited game assets, so the player downloads them from the mod's own releases. ## What this adds - **Gameplay > Button icons**: Auto, Switch, PlayStation, Xbox or Steam Deck. It applies after a restart. - **Only the chosen set loads**, and the other sets are left out, so all three can stay installed. Before this, all of them loaded and the one sorting last won. - **How Auto chooses:** - With one set installed, it uses that set. - Otherwise it uses the set for the controller used last. `pad_sdl.c` saves that controller's kind in `hookshot_pad.txt`, and on a Steam Deck, Steam's `SteamDeck=1` picks the Steam Deck set. - A Switch controller keeps the game's own icons. - Failing all that, the set sorting last loads, as before. - **Overrides:** `HOS_BUTTON_ICONS=auto|switch|playstation|xbox|steamdeck` chooses for one run. The log names the set it loaded and each one it left out. - **Fix:** the menu's save dropped every line it doesn't write, such as a hand-written `discord_app_id=`. Those lines are kept now. ## Tested - `tests/test_button_icons.py`: the choice logic in `host/button_icons.h` (folder names, SDL2 and SDL3 pad types, every pick case). - `test_menu_restart`, `test_audio_output_menu`, `test_rumble_menu`: pass. - `mods.c` and `pad_sdl.c`: clean with `-Wall -Wextra` (syntax check). - **Not yet tested in the game with the mod installed.** That's next, in the local test build. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
NotRexed commented 2026-11-10 05:03:23 +00:00 (Migrated from github.com)

Superseded by #1321, now on main: it draws PlayStation, Xbox and Steam Deck button prompts natively (a Button prompts row: Auto, Switch, Xbox, PS4, PS5, Steam Deck), following the player's bindings, and a mod's own files still win over it. So the ButtonPrompts mods work as before and a picker for them is no longer needed. This PR's other fix (menu saves keeping hand-written lines in hookshot_options.ini) is now its own PR.

Superseded by #1321, now on main: it draws PlayStation, Xbox and Steam Deck button prompts natively (a Button prompts row: Auto, Switch, Xbox, PS4, PS5, Steam Deck), following the player's bindings, and a mod's own files still win over it. So the ButtonPrompts mods work as before and a picker for them is no longer needed. This PR's other fix (menu saves keeping hand-written lines in hookshot_options.ini) is now its own PR.
Commenting is not possible because the repository is archived.
No description provided.