Say "after restart" in the menu only while a restart would change something, and count the waiting settings on Restart.

A setting read at the start showed "after restart" under its value always. The values the game started with are now
kept (cfg.c start_values), a row shows the note only while its value differs from them, and the Restart button counts
the settings that wait, the upscaler, frame generation and HDR among them. A value the environment sets never waits.
--probe-cfg checks the count.

From pull request #377 by mooki000. Three conflicts in the menu resolved against the frame generation rows that came
in since: the upscaling row keeps its description by what can load, and the frame generation restart test knows both
ways NVIDIA's runs.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
chrg6
2026-11-10 09:14:23 -05:00
parent a1fcbb0b07
commit 1f2b320736
11 changed files with 126 additions and 22 deletions

View File

@@ -6,7 +6,7 @@
// is kept). A name without the NX2NAVI_ prefix goes to getenv unchanged. Safe from any thread once cfg_init has returned.
const char *cfg_get(const char *name);
// Reads nx2navi.ini once, from mem_init after the address space is claimed and before any setting is read. Logs the file, its key count, unknown keys and environment overrides.
// Reads nx2navi.ini once, from mem_init after the address space is claimed and before any setting is read. Logs the file, its key count, unknown keys and environment overrides. Keeps the restart-only settings' values (cfg_pending).
void cfg_init(void);
// Replaces the loaded keys with those of the file at path (tests). 1 when the file was read, 0 when missing.
@@ -55,6 +55,11 @@ const CfgMeta *cfg_meta_at(int i);
// What key reads when the player has not set it: the device profile's value (the Steam Deck's), else the row's default;
// NULL for a key without a row. The menu's "default" mark follows it.
const char *cfg_default(const char *key);
// A restart-only setting (live 0) whose value differs from the one cfg_init read at start, which the running game still
// uses: 1 while a restart would change it, 0 otherwise and for a live key or one without a row (the menu's "after
// restart" note). cfg_pending_count: how many restart-only settings differ.
int cfg_pending(const char *key);
int cfg_pending_count(void);
// The setting's value for consumers: the environment or nx2navi.ini value, else the CfgMeta default. name has the NX2NAVI_
// prefix, like cfg_get; a name without a row is a bug (rt_fatal). A row with an empty default has no fixed value: its