refactor(settings)!: settings flow one way: the game makes every rule, the renderer reads the snapshot and reports facts #2882

Closed
HumanBean wants to merge 4 commits from cleanup/area2-settings-one-way into mod-api
Owner

Summary

Settings now go one way, from the game to the renderer. Before, the renderer copied every setting into its own options, wrote its own lines into the options file, and made its own rules: the presets, Auto (this PC)'s choice and its tuning in play, the weak laptop's rows, and a new install's Output resolution. The game then had to read those lines back. Now:

  • The renderer reads the game's settings snapshot each time it uses a setting: settings_now() and, for what applies at the next start, settings_start() (gpu/vk/menu/settings_apply.h, vk_menu.cpp).
  • The game makes every rule (game/crates/longshot-game/src/engine_rules.rs, settings_now.rs take_facts). The renderer only reports facts: in LsCapabilities the device and monitor ids, the card's fingerprint, low spec and the boot output size; in LsRendererStatus Auto's measured load and a bindings serial (game/settings_caps.h, LS_CAPS_LAYOUT 20). Device ids are 512 bytes in the snapshot and the capabilities (LS_SETTINGS_ID_BYTES, LS_CAPS_ID_BYTES); a longer one is left empty or not listed, never cut.
  • The renderer's own lines are now ordinary hidden settings (hidden = true, for system mods only): memory_budget, auto_for, auto_tuned, auto_steps and dlss5_custom. These are removed: hand_line, own_lines, lines_known, the options_version=9 cue, the renderer half of game_options_load, game_options_has, HOS_OPT_OPTIONS_SAVE, and the save after every apply.
  • Settings read at start use the start snapshot (HOS_SETTING_START in host/game_settings.h). Old files are moved only in options_store::migrate and migrate_controls; the host's dead version moves in nn_hid.c are deleted.
  • 58 renderer and host switches that were player choices are now hidden settings. Each switch's GONE row gives its LONGSHOT_SET line. Debugging, kill and attempt switches stay environment variables.
  • MKWVK_API_VERSION goes to 83: the game_options_* members are removed from MkwVkHost, and game_language is added last (the language the game plays in, as the host chose it, so the renderer reads no line for a mod's game language from #2881).
  • The host sets the screen's shape (hos_screen_ratio) before the settings file is first opened, on Windows (hos_main.c) and Linux (the SDL init), so an older profile's Aspect ratio migration sees it.

Read first: settings_now.rs (take_facts, start_facts, output_fact, tune), engine_rules.rs, vk_menu.cpp (menu_settings_apply, menu_capabilities, menu_status, menu_auto_tune), settings_caps.h.

See #2434.

Merge order: after area 1 (#2877, cleanup/area1-old-menu), which goes first. Files both touch: the renderer's Options fields (gpu/vk/vk_menu.h, gpu/vk/vk_menu.cpp, gpu/vk/menu/*.cpp), host/nn_hid.c, game/crates/longshot-game/src/menu.rs, gpu/vk/vk_api.h (MkwVkHost, both at MKWVK_API_VERSION 82: this PR takes the next number when rebased after area 1), host/rx_backend.c, host/game_host.c/h, game/crates/api/src/settings/ffi.rs, and tests/test_menu_ini_keys.py.

Testing

Tested: Linux (CachyOS), RTX 3090, through the job queue, headless. Two starts of one profile (LONGSHOT_PROFILE, fresh run folders): the first a new install with no settings file, the second the same profile again. Second start: Speaker layout 5.1 and Auto's lines kept (auto_for, auto_tuned, memory_budget), no "first start" or "none chosen" line, the tuning not repeated. First start, on a new install with no settings file: Auto (this PC) chose tier 5, DLSS and Render resolution 3. The Output resolution was set to 2560x1440 with the "none chosen" line. The in-play measurement "the CPU holds the frame rate" kept resolution 3. settings.toml was written with quality_preset = "auto-this-pc", auto_for and memory_budget. Setting the restart-taking Speaker layout row to 5.1 through the bridge wrote audio_output = "5-1". Rebased onto mod-api 12f42db5 (#2861's places: hidden settings stay out of the menu fake's lists, game.menu.systemSettings/unplacedSettings, and dlss5_custom is off NOT_ROWS); after it, cargo test -p modtool the_typescript_system_mods_pass_their_tests, schema-gen --check, test_menu_ini_keys and test_switch_table pass. Before the rebase, checks: run_all gives 835 passed and 3 failed. Of the 3, test_lifter also fails on mod-api: game-core/src/nav.rs fmt from #2745, and build-core ProfileLock::held. test_walk_key was fixed after the run and passes. test_reshade_fx failed only because of my job's SPIR-V path and passes with the right one. The renderer builds for Windows (llvm-mingw); clippy and fmt pass on api, longshot-game and host-sys. In the host's Windows compile only nn_video.c fails, because FFmpeg headers are missing in this environment (a file this change does not touch).

After the review (rebased onto mod-api 75bcd270, #2881; job-queue build job, Linux, for this head and #2894's): run_all 837 passed, 0 failed, 11 skipped; dev.py rt builds; the host compiles for Windows (llvm-mingw, with the FFmpeg headers) and Linux; the renderer's Windows sources compile; clippy passes on host-sys, longshot-game and schema. New game-free checks: test_fullscreen_monitor_platform (the screen's shape before any settings read, Windows and Linux paths), options_store device_ids_whole_or_left_empty, and test_game_language (a mod's game language through the host's answer).

Still to test:

  • An older profile (options_version 5, ultrawide=0) on a 16:10 or 4:3 screen: expect the Aspect ratio moved to the monitor's shape (by hand).
  • A PC with an iGPU (a weak laptop): press Settings for a weak laptop. Expect Minimum's rows and the restart question. Covered only by game-free tests (@Beanstalk on a laptop iGPU).
  • Windows: Alt+Enter, then restart. Expect fullscreen saved as the window has it (by hand).
  • A file from main with a GPU device chosen: expect the card's gpu_device_id saved at the first start (by hand, multi-GPU PC).

Measurements

Nothing to measure: settings plumbing. The renderer reads the same values through a pointer instead of a copy, and each frame the game reads a 352-byte status. Auto's tuning rules are unchanged.

Risks

  • A setting the renderer read from its own lines that is now missing from the snapshot would fall back to its default. The frozen-keys test keeps every key of main's longshot_options.ini readable.
  • capture_spare_mb and staging_keep_mb are stored as n + 1 (1 is the old switch's 0).
  • The 58 converted switches no longer work as environment variables. vk: logs a line naming the LONGSHOT_SET replacement.
  • A revert is enough to undo this.

Checklist

Ready for review

  • One topic, on current main; the title is a Conventional Commit. (on mod-api 75bcd270)
  • Tested on my own PC, in the game for a change the game runs, as Testing says.
  • mise run test passes (any failure that also fails on main is named).
  • Measured against main, or Measurements says why there is nothing to measure.
  • No game files, build output or hand-edited generated files; third_party/ untouched; nothing GPL-incompatible.

When it applies

  • A switch added or changed: it ships at the default the measurements chose, with its row in gpu/vk/switches.def.
  • A check under tests/ that reads changed source is updated, not weakened.
  • MKWVK_API_VERSION bumped (MkwVkHost or MkwVkRenderer in gpu/vk/vk_api.h changed).
  • Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths.
  • Docs updated.
  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.

🤖 Generated with Claude Code

https://claude.ai/code/session_016o1k1SQVyAWsujjFVd8Wuc

## Summary Settings now go one way, from the game to the renderer. Before, the renderer copied every setting into its own options, wrote its own lines into the options file, and made its own rules: the presets, Auto (this PC)'s choice and its tuning in play, the weak laptop's rows, and a new install's Output resolution. The game then had to read those lines back. Now: - The renderer reads the game's settings snapshot each time it uses a setting: `settings_now()` and, for what applies at the next start, `settings_start()` (`gpu/vk/menu/settings_apply.h`, `vk_menu.cpp`). - The game makes every rule (`game/crates/longshot-game/src/engine_rules.rs`, `settings_now.rs` `take_facts`). The renderer only reports facts: in `LsCapabilities` the device and monitor ids, the card's fingerprint, low spec and the boot output size; in `LsRendererStatus` Auto's measured load and a bindings serial (`game/settings_caps.h`, `LS_CAPS_LAYOUT` 20). Device ids are 512 bytes in the snapshot and the capabilities (`LS_SETTINGS_ID_BYTES`, `LS_CAPS_ID_BYTES`); a longer one is left empty or not listed, never cut. - The renderer's own lines are now ordinary hidden settings (`hidden = true`, for system mods only): `memory_budget`, `auto_for`, `auto_tuned`, `auto_steps` and `dlss5_custom`. These are removed: `hand_line`, `own_lines`, `lines_known`, the `options_version=9` cue, the renderer half of `game_options_load`, `game_options_has`, `HOS_OPT_OPTIONS_SAVE`, and the save after every apply. - Settings read at start use the start snapshot (`HOS_SETTING_START` in `host/game_settings.h`). Old files are moved only in `options_store::migrate` and `migrate_controls`; the host's dead version moves in `nn_hid.c` are deleted. - 58 renderer and host switches that were player choices are now hidden settings. Each switch's `GONE` row gives its `LONGSHOT_SET` line. Debugging, kill and attempt switches stay environment variables. - `MKWVK_API_VERSION` goes to 83: the `game_options_*` members are removed from `MkwVkHost`, and `game_language` is added last (the language the game plays in, as the host chose it, so the renderer reads no line for a mod's game language from #2881). - The host sets the screen's shape (`hos_screen_ratio`) before the settings file is first opened, on Windows (`hos_main.c`) and Linux (the SDL init), so an older profile's Aspect ratio migration sees it. Read first: `settings_now.rs` (`take_facts`, `start_facts`, `output_fact`, `tune`), `engine_rules.rs`, `vk_menu.cpp` (`menu_settings_apply`, `menu_capabilities`, `menu_status`, `menu_auto_tune`), `settings_caps.h`. See #2434. **Merge order: after area 1 ([#2877](https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/2877), cleanup/area1-old-menu), which goes first.** Files both touch: the renderer's `Options` fields (`gpu/vk/vk_menu.h`, `gpu/vk/vk_menu.cpp`, `gpu/vk/menu/*.cpp`), `host/nn_hid.c`, `game/crates/longshot-game/src/menu.rs`, `gpu/vk/vk_api.h` (`MkwVkHost`, both at `MKWVK_API_VERSION` 82: this PR takes the next number when rebased after area 1), `host/rx_backend.c`, `host/game_host.c/h`, `game/crates/api/src/settings/ffi.rs`, and `tests/test_menu_ini_keys.py`. ## Testing **Tested:** Linux (CachyOS), RTX 3090, through the job queue, headless. Two starts of one profile (`LONGSHOT_PROFILE`, fresh run folders): the first a new install with no settings file, the second the same profile again. Second start: Speaker layout 5.1 and Auto's lines kept (`auto_for`, `auto_tuned`, `memory_budget`), no "first start" or "none chosen" line, the tuning not repeated. First start, on a new install with no settings file: Auto (this PC) chose tier 5, DLSS and Render resolution 3. The Output resolution was set to 2560x1440 with the "none chosen" line. The in-play measurement "the CPU holds the frame rate" kept resolution 3. `settings.toml` was written with `quality_preset = "auto-this-pc"`, `auto_for` and `memory_budget`. Setting the restart-taking Speaker layout row to 5.1 through the bridge wrote `audio_output = "5-1"`. Rebased onto mod-api 12f42db5 (#2861's places: hidden settings stay out of the menu fake's lists, `game.menu.systemSettings`/`unplacedSettings`, and `dlss5_custom` is off `NOT_ROWS`); after it, `cargo test -p modtool the_typescript_system_mods_pass_their_tests`, `schema-gen --check`, `test_menu_ini_keys` and `test_switch_table` pass. Before the rebase, checks: `run_all` gives 835 passed and 3 failed. Of the 3, `test_lifter` also fails on mod-api: `game-core/src/nav.rs` fmt from #2745, and build-core `ProfileLock::held`. `test_walk_key` was fixed after the run and passes. `test_reshade_fx` failed only because of my job's SPIR-V path and passes with the right one. The renderer builds for Windows (llvm-mingw); clippy and fmt pass on api, longshot-game and host-sys. In the host's Windows compile only `nn_video.c` fails, because FFmpeg headers are missing in this environment (a file this change does not touch). After the review (rebased onto mod-api 75bcd270, #2881; job-queue build job, Linux, for this head and #2894's): `run_all` 837 passed, 0 failed, 11 skipped; `dev.py rt` builds; the host compiles for Windows (llvm-mingw, with the FFmpeg headers) and Linux; the renderer's Windows sources compile; clippy passes on host-sys, longshot-game and schema. New game-free checks: `test_fullscreen_monitor_platform` (the screen's shape before any settings read, Windows and Linux paths), `options_store` `device_ids_whole_or_left_empty`, and `test_game_language` (a mod's game language through the host's answer). **Still to test:** - An older profile (`options_version` 5, `ultrawide=0`) on a 16:10 or 4:3 screen: expect the Aspect ratio moved to the monitor's shape (by hand). - A PC with an iGPU (a weak laptop): press Settings for a weak laptop. Expect Minimum's rows and the restart question. Covered only by game-free tests (@Beanstalk on a laptop iGPU). - Windows: Alt+Enter, then restart. Expect fullscreen saved as the window has it (by hand). - A file from main with a GPU device chosen: expect the card's `gpu_device_id` saved at the first start (by hand, multi-GPU PC). ## Measurements Nothing to measure: settings plumbing. The renderer reads the same values through a pointer instead of a copy, and each frame the game reads a 352-byte status. Auto's tuning rules are unchanged. ## Risks - A setting the renderer read from its own lines that is now missing from the snapshot would fall back to its default. The frozen-keys test keeps every key of main's `longshot_options.ini` readable. - `capture_spare_mb` and `staging_keep_mb` are stored as n + 1 (1 is the old switch's 0). - The 58 converted switches no longer work as environment variables. `vk:` logs a line naming the `LONGSHOT_SET` replacement. - A revert is enough to undo this. ## Checklist ### Ready for review - [x] One topic, on current `main`; the title is a Conventional Commit. (on mod-api 75bcd270) - [x] Tested on my own PC, in the game for a change the game runs, as Testing says. - [x] `mise run test` passes (any failure that also fails on `main` is named). - [x] Measured against `main`, or Measurements says why there is nothing to measure. - [x] No game files, build output or hand-edited generated files; `third_party/` untouched; nothing GPL-incompatible. ### When it applies - [x] A switch added or changed: it ships at the default the measurements chose, with its row in `gpu/vk/switches.def`. - [x] A check under `tests/` that reads changed source is updated, not weakened. - [x] `MKWVK_API_VERSION` bumped (`MkwVkHost` or `MkwVkRenderer` in `gpu/vk/vk_api.h` changed). - [x] Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths. - [x] Docs updated. - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_016o1k1SQVyAWsujjFVd8Wuc
refactor(settings)!: settings flow one way: the renderer reads the snapshot, the game makes every rule (#2434)
Some checks failed
PR description / Title and description (pull_request_target) Failing after 7s
fbf1783788
The renderer reads the game's settings snapshot per use (settings_now, settings_start) instead of copying every
field into its own options; the game makes every rule (presets, Auto (this PC)'s choice and in-play tuning, the
weak laptop's rows, a new install's Output resolution) from facts the renderer reports in LsCapabilities and
LsRendererStatus. The renderer's own options-file lines are hidden settings (memory_budget, auto_for, auto_tuned,
auto_steps, dlss5_custom), and hand_line, own_lines, lines_known, the options_version=9 cue, game_options_load's
renderer half and the save after every apply are gone. Start-time reads use the start snapshot (HOS_SETTING_START);
the old files' moves are only in options_store::migrate and migrate_controls.

58 renderer and host switches that were choices became hidden settings (GONE rows give each its LONGSHOT_SET line);
debugging switches stay environment variables. MKWVK_API_VERSION 82, LS_CAPS_LAYOUT 19.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016o1k1SQVyAWsujjFVd8Wuc
Member

Possibly related, for context:

  • PR #2718 feat(menu): add live display/handheld-aware framegen hints and filter unreachable targets — Uses settings snapshot/status ABI changed here
  • issue #1493 Renderer rewrite — Renderer rework plan covers settings interface ownership
Possibly related, for context: - PR #2718 feat(menu): add live display/handheld-aware framegen hints and filter unreachable targets — Uses settings snapshot/status ABI changed here - issue #1493 Renderer rewrite — Renderer rework plan covers settings interface ownership
Author
Owner
@review
BeanBot left a comment

Recommendation: Request changes. Older profiles can lose their aspect-ratio migration, and long device identifiers are truncated before the host uses them. The refactor also needs in-game coverage on the other affected platforms before merge.

The change moves settings rules and persistence into the game and has the renderer consume snapshots. It reduces duplicated ownership, but changes startup, device selection, live settings and rendering paths across both supported platforms.

Blocking (2): must change before merging.

  1. L1 host/hos_main.c:1301: The monitor is prepared before its aspect ratio is published, but preparing it now opens and migrates the settings file. (more on the line) Do: Determine and publish the screen aspect before opening and migrating settings, while avoiding the monitor-loading dependency cycle. Add a startup-path test using an older profile and a narrow monitor.
  2. L4: The check PR description / Title and description (pull_request_target) fails on this head and passes on the base branch: Failing after 7s.

Should fix (1): not blocking, but worth doing before merging.

  • L2 game/crates/host-sys/src/settings_abi.rs:932: Device identifiers are silently truncated to 127 bytes when copied into the settings snapshot. When: A saved audio-output or fullscreen-monitor identifier longer than 127 UTF-8 bytes is passed to the host as a different identifier. The host then cannot match the selected device and falls back instead of restoring the player's choice; the previous monitor path accepted identifiers up to 511 bytes. Do: Carry complete supported device identifiers through the snapshot and capability lists, or reject overlong identifiers without saving a choice that cannot be restored. Test an identifier longer than 127 bytes through selection and restart.

Testing before merging (1) (runs on the systems it can change; it doesn't hold the recommendation)

  • L3: The settings flow affects startup and rendering on systems beyond the reported Linux NVIDIA run. When: Windows, AMD and Steam Deck players use the changed snapshot, device and preset paths, but no in-game result is reported for those systems. Do: Run the changed settings and profile-migration paths on the affected Tier 1 systems, including the listed Windows fullscreen and multi-GPU cases and the weak-laptop case.

@fix can do L1, L2 and L4.

More: does it help, other systems, switches, what was read

Does it help: Not a perf change. The reported Linux RTX 3090 run exercised two starts and Auto tuning, but it does not establish that existing profiles and device choices work across the affected systems.

Other systems: Startup settings, fullscreen monitors, audio devices, input bindings, Auto tuning and renderer settings are affected on Windows and Linux. The reported run covers Linux on one NVIDIA GPU; Windows, AMD and Steam Deck behavior remain unverified.

Switches: The PR removes 58 environment switches and replaces them with hidden settings; debugging and kill switches remain. The switch table documents replacements, but I did not independently verify every replacement and default.

Reviewed: fbf1783788 against 12f42db5c1: Read the repository rules, PR template, standards, commit and change summary, and inspected the settings snapshot, startup, migration, host monitor and device-ID paths. Skimmed the remaining changes; I did not read every changed code file or test in full, so this review is incomplete.; nothing run (a code review).

Checked and fine:

  • The commit records AI assistance.
  • MKWVK_API_VERSION is bumped for the changed renderer interface.

Testing: Read-only review; no code or tests were run. The PR reports a headless Linux RTX 3090 run and several checks, with Windows host compilation and other hardware runs still outstanding.

Overlaps and merge order: The PR identifies #2877 as a prerequisite, with overlapping renderer, host, API and test files; #2877 should merge first and this PR must then take the next API version.


Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.

**Recommendation: Request changes.** Older profiles can lose their aspect-ratio migration, and long device identifiers are truncated before the host uses them. The refactor also needs in-game coverage on the other affected platforms before merge. The change moves settings rules and persistence into the game and has the renderer consume snapshots. It reduces duplicated ownership, but changes startup, device selection, live settings and rendering paths across both supported platforms. **Blocking (2)**: must change before merging. 1. **L1** `host/hos_main.c:1301`: The monitor is prepared before its aspect ratio is published, but preparing it now opens and migrates the settings file. (more on the line) **Do:** Determine and publish the screen aspect before opening and migrating settings, while avoiding the monitor-loading dependency cycle. Add a startup-path test using an older profile and a narrow monitor. 2. **L4**: The check `PR description / Title and description (pull_request_target)` fails on this head and passes on the base branch: Failing after 7s. **Should fix (1)**: not blocking, but worth doing before merging. - **L2** `game/crates/host-sys/src/settings_abi.rs:932`: Device identifiers are silently truncated to 127 bytes when copied into the settings snapshot. *When:* A saved audio-output or fullscreen-monitor identifier longer than 127 UTF-8 bytes is passed to the host as a different identifier. The host then cannot match the selected device and falls back instead of restoring the player's choice; the previous monitor path accepted identifiers up to 511 bytes. **Do:** Carry complete supported device identifiers through the snapshot and capability lists, or reject overlong identifiers without saving a choice that cannot be restored. Test an identifier longer than 127 bytes through selection and restart. **Testing before merging (1)** (runs on the systems it can change; it doesn't hold the recommendation) - **L3**: The settings flow affects startup and rendering on systems beyond the reported Linux NVIDIA run. *When:* Windows, AMD and Steam Deck players use the changed snapshot, device and preset paths, but no in-game result is reported for those systems. **Do:** Run the changed settings and profile-migration paths on the affected Tier 1 systems, including the listed Windows fullscreen and multi-GPU cases and the weak-laptop case. `@fix` can do L1, L2 and L4. <details> <summary>More: does it help, other systems, switches, what was read</summary> **Does it help:** Not a perf change. The reported Linux RTX 3090 run exercised two starts and Auto tuning, but it does not establish that existing profiles and device choices work across the affected systems. **Other systems:** Startup settings, fullscreen monitors, audio devices, input bindings, Auto tuning and renderer settings are affected on Windows and Linux. The reported run covers Linux on one NVIDIA GPU; Windows, AMD and Steam Deck behavior remain unverified. **Switches:** The PR removes 58 environment switches and replaces them with hidden settings; debugging and kill switches remain. The switch table documents replacements, but I did not independently verify every replacement and default. **Reviewed:** fbf178378874 against 12f42db5c145: Read the repository rules, PR template, standards, commit and change summary, and inspected the settings snapshot, startup, migration, host monitor and device-ID paths. Skimmed the remaining changes; I did not read every changed code file or test in full, so this review is incomplete.; nothing run (a code review). **Checked and fine:** - The commit records AI assistance. - MKWVK_API_VERSION is bumped for the changed renderer interface. **Testing:** Read-only review; no code or tests were run. The PR reports a headless Linux RTX 3090 run and several checks, with Windows host compilation and other hardware runs still outstanding. **Overlaps and merge order:** The PR identifies #2877 as a prerequisite, with overlapping renderer, host, API and test files; #2877 should merge first and this PR must then take the next API version. </details> --- <sub>Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.</sub>
host/hos_main.c Outdated
@ -1299,4 +1299,3 @@
int saved = ultrawide < 0 ? -1 : ultrawide != 0, version = hos_options_int("options_version", 0);
void hos_monitor_prepare(void);
int hos_monitor_screen_size(int *,int *);
hos_monitor_prepare();
Member

L1 (blocking): The monitor is prepared before its aspect ratio is published, but preparing it now opens and migrates the settings file.

When: On a 16:10 display with an older profile containing options_version=5 and ultrawide=0, hos_monitor_prepare calls hos_monitor_load, which calls game_settings_at_start. The migration sees no screen aspect, keeps ultrawide=0 and writes the current version; the intended migration to the monitor's shape is then permanently skipped.

Do: Determine and publish the screen aspect before opening and migrating settings, while avoiding the monitor-loading dependency cycle. Add a startup-path test using an older profile and a narrow monitor.

**L1** (blocking): The monitor is prepared before its aspect ratio is published, but preparing it now opens and migrates the settings file. *When:* On a 16:10 display with an older profile containing options_version=5 and ultrawide=0, hos_monitor_prepare calls hos_monitor_load, which calls game_settings_at_start. The migration sees no screen aspect, keeps ultrawide=0 and writes the current version; the intended migration to the monitor's shape is then permanently skipped. **Do:** Determine and publish the screen aspect before opening and migrating settings, while avoiding the monitor-loading dependency cycle. Add a startup-path test using an older profile and a narrow monitor.
HumanBean force-pushed cleanup/area2-settings-one-way from fbf1783788
Some checks failed
PR description / Title and description (pull_request_target) Failing after 7s
to 5536cf21b1
All checks were successful
PR description / Title and description (pull_request_target) Successful in 8s
2026-11-30 17:54:00 +00:00
Compare
Author
Owner

Thanks. L1 fixed: the screen's shape is now set from the current or main monitor before the settings are first read, on Windows (hos_main.c) and on Linux (the SDL init), with a game-free order test. L2 fixed: device ids are 512 bytes in the snapshot and the capabilities, and an id that still doesn't fit is left empty or not listed, never cut (tested). L4: the description is fixed. Rebased onto mod-api 75bcd270 (#2881): a mod's game language now reaches the renderer through the host's answer (MkwVkHost.game_language, API 83). L3 (Windows, AMD, Steam Deck runs) is listed under Still to test.

Thanks. L1 fixed: the screen's shape is now set from the current or main monitor before the settings are first read, on Windows (`hos_main.c`) and on Linux (the SDL init), with a game-free order test. L2 fixed: device ids are 512 bytes in the snapshot and the capabilities, and an id that still doesn't fit is left empty or not listed, never cut (tested). L4: the description is fixed. Rebased onto mod-api 75bcd270 (#2881): a mod's game language now reaches the renderer through the host's answer (`MkwVkHost.game_language`, API 83). L3 (Windows, AMD, Steam Deck runs) is listed under Still to test.
Author
Owner

Landed on mod-api as 3ad99c9e (one commit), after its review fixes and one batched build + game run of all six cleanup areas together. mod-api work now goes straight onto the branch once self-reviewed.

Landed on mod-api as 3ad99c9e (one commit), after its review fixes and one batched build + game run of all six cleanup areas together. mod-api work now goes straight onto the branch once self-reviewed.
HumanBean closed this pull request 2026-11-30 22:34:11 +00:00
All checks were successful
PR description / Title and description (pull_request_target) Successful in 8s

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot!2882
No description provided.