mirror of
https://github.com/valentderah/totk-pc-recomp.git
synced 2026-11-20 04:35:57 +00:00
Crash guards switchable from totk.ini: optref_guard, ability_guard, report_guard (#1005)
The three patch sets read their switch through cfg, so the keys already worked from totk.ini but logged as unknown and were undocumented. They are now known keys with defaults (on), in [performance] of totk.ini.example; the settings menu does not show them. The settings table reached 128 rows, the size of the menu's reset list, so that list grows to 256 and logs if the table ever outgrows it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
5d8c2ceb30
commit
42c458712d
3 files changed
+18
-6
No files matched your search
+3
-2
@@ -962,9 +962,10 @@ static bool validation_layer_present(void) {
|
||||
|
||||
// Every setting the menu shows back to its default (the environment's keys stay), written to totk.ini.
|
||||
static void reset_all(void) {
|
||||
const char *keys[128];
|
||||
const char *keys[256]; // above the number of rows in cfg.c metas (128 on 2026-11-11)
|
||||
int n = 0;
|
||||
for (const CfgMeta *m; n < 128 && (m = cfg_meta_at(n)); n++) keys[n] = m->key;
|
||||
for (const CfgMeta *m; n < 256 && (m = cfg_meta_at(n)); n++) keys[n] = m->key;
|
||||
if (cfg_meta_at(n)) rt_log("menu: reset covers the first %d settings only; raise keys[] in reset_all", n);
|
||||
int done = cfg_reset(keys, n);
|
||||
opt_save_soon();
|
||||
rt_log("menu: reset %d settings to their defaults", done);
|
||||
|
||||
Reference in new issue
Block a user