The Insert menu's choices kept with the saves #324

Closed
gab9281 wants to merge 3 commits from windows/options-with-saves into main
gab9281 commented 2026-11-07 20:47:16 +00:00 (Migrated from github.com)

Part of splitting #83 into small PRs. Depends on #295: this branch is built on it, so its first two commits are #295's. Only the last one, "The Insert menu's choices kept with the saves", is new here.

hookshot_options.ini lived beside the game, while the saves moved to the system's place (XDG data on Linux, Documents\My Games\Hookshot on Windows with #295). A game folder that is rebuilt, moved or deleted lost the options, and the AppImage's folders don't keep them either.

  • The options file now lives with the saves (hos_options_path()).
  • A hookshot_options.ini left beside the game by an earlier build is moved there once, and it stays where it was if the move fails.
  • Everything that reads it now asks for that path: the Insert menu (through MkwVkHost.options_path, API version 2), the ultrawide setting and the handheld profile.
  • When the saves stay beside the game (no system folder), the options stay too, as before.

Tested on Linux (game built from this branch, XDG_DATA_HOME pointed at a scratch folder holding a copy of real saves):

  • With fps_counter=1 in a hookshot_options.ini beside the game, the log says options: moved from <game>/hookshot_options.ini to <XDG_DATA_HOME>/hookshot/hookshot_options.ini, and the FPS counter shows.
  • In the Insert menu, FPS counter → Off was written to the moved file (fps_counter=0), and nothing was written beside the game.
  • The host files also compile for Windows (clang-cl with the Windows SDK). tests/ gives the same result as on main (the 4 test_cpp_preflight checks need Visual Studio).

🤖 Generated with Claude Code

Part of splitting #83 into small PRs. **Depends on #295**: this branch is built on it, so its first two commits are #295's. Only the last one, "The Insert menu's choices kept with the saves", is new here. `hookshot_options.ini` lived beside the game, while the saves moved to the system's place (XDG data on Linux, `Documents\My Games\Hookshot` on Windows with #295). A game folder that is rebuilt, moved or deleted lost the options, and the AppImage's folders don't keep them either. - The options file now lives with the saves (`hos_options_path()`). - A `hookshot_options.ini` left beside the game by an earlier build is moved there once, and it stays where it was if the move fails. - Everything that reads it now asks for that path: the Insert menu (through `MkwVkHost.options_path`, API version 2), the ultrawide setting and the handheld profile. - When the saves stay beside the game (no system folder), the options stay too, as before. **Tested on Linux** (game built from this branch, `XDG_DATA_HOME` pointed at a scratch folder holding a copy of real saves): - With `fps_counter=1` in a `hookshot_options.ini` beside the game, the log says `options: moved from <game>/hookshot_options.ini to <XDG_DATA_HOME>/hookshot/hookshot_options.ini`, and the FPS counter shows. - In the Insert menu, FPS counter → Off was written to the moved file (`fps_counter=0`), and nothing was written beside the game. - The host files also compile for Windows (clang-cl with the Windows SDK). `tests/` gives the same result as on main (the 4 `test_cpp_preflight` checks need Visual Studio). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
NotRexed commented 2026-11-07 23:08:25 +00:00 (Migrated from github.com)

Thanks! This builds on #295, which we decided against (the saves stay in the game folder, players asked for that). With the saves beside the game the options stay there too, so this would change nothing now. Closing; the hos_options_path() refactor is welcome again if we ever move the saves.

Thanks! This builds on #295, which we decided against (the saves stay in the game folder, players asked for that). With the saves beside the game the options stay there too, so this would change nothing now. Closing; the hos_options_path() refactor is welcome again if we ever move the saves.
Commenting is not possible because the repository is archived.
No description provided.