diff options
| author | salmonik <salmonik@tuta.io> | 2026-11-06 16:30:10 +0100 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-11-06 16:30:10 +0100 |
| commit | e339d1dc45b3113648552b0002e0c15f55e61cb2 (patch) | |
| tree | 4570dc0ba1501ea26e87447d234693ad5532e813 /src/features.h | |
| parent | docs: record the esp.cpp split in the plan (diff) | |
| download | hl2h-e339d1dc45b3113648552b0002e0c15f55e61cb2.tar.gz hl2h-e339d1dc45b3113648552b0002e0c15f55e61cb2.zip | |
Config: generate save/load/reset from one settings table
Every persisted setting now lives in a single descriptor table
(config_table.cpp) with its section, key, type, default and clamp range.
config_save(), config_load() and config_reset_defaults() iterate it, so the
three functions can no longer disagree about defaults or bounds, and the old
hand-written 350-line parser is gone.
Section and key names are unchanged, so existing config files keep loading, and
the duplicated [view] scalar clamp block is replaced by per-entry limits.
Diffstat (limited to 'src/features.h')
| -rw-r--r-- | src/features.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/features.h b/src/features.h index 6890aa6..b4616a1 100644 --- a/src/features.h +++ b/src/features.h | |||
| @@ -133,4 +133,9 @@ QAngle gui_frozen_view(); | |||
| 133 | void gui_config_init(); | 133 | void gui_config_init(); |
| 134 | void gui_config_write(FILE *f); | 134 | void gui_config_write(FILE *f); |
| 135 | 135 | ||
| 136 | // Declarative settings persistence (config_table.cpp). | ||
| 137 | void settings_save(FILE *f); | ||
| 138 | void settings_load(FILE *f); | ||
| 139 | void settings_reset_defaults(); | ||
| 140 | |||
| 136 | #endif | 141 | #endif |
