benilla-re systems structs docs

SaveConfig

function · cvar · host

Address
0x63d980 · 357 bytes, up to 0x63dae4
Signature
uint32_t __cdecl (void)
Meaning
Writes SET lines for the records that differ from their default, only when the config is dirty
Confidence
verified, proof two
Finding
cvar/config#writing-the-file

Finding: Writing the file in cvar: config

SaveConfig writes the file only while the dirty byte is set, and clears it first. It opens WTF\<name> for writing and replaces the file (CreateFile with CREATE_ALWAYS, share mode 0; 0x63d9dd, 0x63d9df), so any line of the old file that is not a SET line is lost. For each record in list order whose bit 0 is set, it picks the latched text, else the value, else the default; it skips a record with no text or whose text equals its default case-blind, and writes SET <name> "<text>" and a line feed for the rest. It returns 1 on success, and 0 when the file will not open or a write stores nothing.

The derivation is in the doc.

Callers 3

Callees 8

Calls and jumps by a bare address, from tables/calls.tsv.