MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / LoadFromConfig

Method LoadFromConfig

src/window.cpp:155–163  ·  view source on GitHub ↗

* Load all WindowDesc settings from _windows_file. */

Source from the content-addressed store, hash-verified

153 * Load all WindowDesc settings from _windows_file.
154 */
155void WindowDesc::LoadFromConfig()
156{
157 IniFile ini;
158 ini.LoadFromDisk(_windows_file, NO_DIRECTORY);
159 for (WindowDesc *wd : *_window_descs) {
160 if (wd->ini_key.empty()) continue;
161 IniLoadWindowSettings(ini, wd->ini_key, wd);
162 }
163}
164
165/**
166 * Sort WindowDesc by ini_key.

Callers

nothing calls this directly

Calls 3

IniLoadWindowSettingsFunction · 0.85
LoadFromDiskMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected