benilla-re systems structs docs

WriteBindingSetIfCurrent

function · ui · orchestration

Address
0x4b65b0 · 41 bytes, up to 0x4b65d8
Signature
void __fastcall (void *unused, void *handle, uint32_t set)
Meaning
Writes a set to a handle when it is set 1 or the current set, ignoring a handle of -1
Confidence
verified, proof one
Finding
ui/keybindings#writing-binding-files

Finding: Writing binding files in ui: key bindings

The files are written when the interface shuts down, at game shutdown or from a flag-gated site in the frame update. The dirty mask at +0xd4 of the manager says what changed: bit 1 (set 1) writes both files, bit 2 (set 2) the character file alone. Each file is opened for writing, which empties it, and the writer puts bind <key> <command> plus carriage return and line feed for every key of the set, in the order of the set's key list. The account file gets set 1. The character file gets set 2 only when the current set is 2, so after the account set is saved it is left empty. A section marked pending is skipped.

The derivation is in the doc.

Callers 0

None by a direct call or jump.

Callees 1

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