From 4fe13391895efaa7dca8b456e9fdcd54806239c7 Mon Sep 17 00:00:00 2001 From: chrg6 Date: Fri, 13 Nov 2026 19:35:54 -0500 Subject: [PATCH] Say in nx2navi.ini.example's header which settings cut a comment after the value and which take the switch words. The review found that the header promised more than cfg.c does in two places. It said a blank then '#' or ';' after any number starts a comment, but cfg.c cut_comment cuts only for a row with a set of values, so the settings that take any number (gpu_index, compute_keep, tex_released_max, floor_probe, floor_scan) keep the comment in the value: "compute_keep = 256 # less" reads the default 512. And it said a setting of 0 or 1 takes off, false and no, but switch_word maps the words only for a row whose set is exactly 0|1; a setting with choices 0, 1 or 2 such as async_preempt or tex_disuse reads "off" as its default, on, with no line in the log. The header now says the comment is cut after the value of a setting with a list of choices or a range, names those five number settings among what keeps its whole text, and gives the words to the settings whose only values are 0 and 1. docs/building.md's paragraph on tests/cfg_parse_check.py now also names the low-end switch's case and make_game.py's tests added by the previous commit. Comments and docs only; cfg_rows_check reports 0 problems. Co-Authored-By: Claude Opus 5.5 --- docs/building.md | 8 +++++--- nx2navi.ini.example | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/docs/building.md b/docs/building.md index 3b902795..2ab39662 100644 --- a/docs/building.md +++ b/docs/building.md @@ -918,9 +918,11 @@ A change to how nx2navi.ini and the environment are read (`runtime/cfg.c` `cfg_l `cfg_bool`, `check_value`) passes `python tests\cfg_parse_check.py`, which builds `cfg.c` with stand-ins for what it links with and loads scratch files: a comment after a value of a setting with a set of values is cut and logged once with its line, free text, a value in double quotes and the environment keep theirs; switches written as words read as -0 or 1 through every reader; values outside their sets are logged with their line, at most 16 lines and a count; a -full settings table logs one line at load and one for the menu. The launcher's reader (`launcher/gameini.py`) has the -same comment lines in `tests\launcher_test.py` `PlayerIniTest`. No game files. +0 or 1 through every reader, the low-end mode's switch (`lowend_of`, read apart from `cfg_get`) included; values +outside their sets are logged with their line, at most 16 lines and a count; a full settings table logs one line at +load and one for the menu. The launcher's reader (`launcher/gameini.py`) has the same comment lines in +`tests\launcher_test.py` `PlayerIniTest`, and `tools/make_game.py`'s own reads of `shader_carry` and `low_end_gpu` +(`shader_carry`, `guest_opt_ini`) theirs in `MakeGameTest`. No game files. The lifter (`recomp/`) and the CPU headers (`runtime/cpu.h`, `runtime/simd.h`) are checked against Unicorn. Every lifter change passes these, all run with `.venv`: diff --git a/nx2navi.ini.example b/nx2navi.ini.example index 35fe2891..9697070a 100644 --- a/nx2navi.ini.example +++ b/nx2navi.ini.example @@ -1,9 +1,11 @@ # nx2navi.ini: settings for nx2navi.exe. Copy this file to nx2navi.ini next to nx2navi.exe and remove the '#' of a line to change it. # Each line shows the default; on a Steam Deck the device profile ([display]) changes a few of them. A NX2NAVI_* # environment variable of the same name (NX2NAVI_FPS_LIMIT for fps_limit) overrides the file. Keys are case-insensitive; -# '#' and ';' start a comment; [sections] only group lines. After a number or one of a setting's words, a space or tab -# then '#' or ';' starts a comment too ("fps_limit = 144 # my monitor" is 144); a path, a name or a size keeps its whole -# text. A setting of 0 or 1 also takes off, false and no for 0 and on, true and yes for 1. +# '#' and ';' start a comment; [sections] only group lines. After the value of a setting with a list of choices or a +# range, a space or tab then '#' or ';' starts a comment too ("fps_limit = 144 # my monitor" is 144); a path, a name, a +# size, a keyboard key and the settings that take any number (gpu_index, compute_keep, tex_released_max, floor_probe, +# floor_scan) keep their whole text. A setting whose only values are 0 and 1 also takes off, false and no for 0 and on, +# true and yes for 1; a setting with more choices than 0 and 1 takes only the choices its lines here list. # Only the keys in this file are settings. A line with any other key does nothing: the game's log names it at the # start ("no setting of this version") and the settings menu (F1) shows it in its bottom row. # Updates and rebuilds of the game never rewrite nx2navi.ini; the settings menu changes only the lines of the settings