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

Function SaveLoadHotkeys

src/hotkeys.cpp:314–328  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

312
313
314static void SaveLoadHotkeys(bool save)
315{
316 IniFile ini{};
317 ini.LoadFromDisk(_hotkeys_file, NO_DIRECTORY);
318
319 for (HotkeyList *list : *_hotkey_lists) {
320 if (save) {
321 list->Save(ini);
322 } else {
323 list->Load(ini);
324 }
325 }
326
327 if (save) ini.SaveToDisk(_hotkeys_file);
328}
329
330
331/** Load the hotkeys from the config file */

Callers 2

LoadHotkeysFromConfigFunction · 0.85
SaveHotkeysToConfigFunction · 0.85

Calls 4

LoadFromDiskMethod · 0.80
SaveToDiskMethod · 0.80
SaveMethod · 0.45
LoadMethod · 0.45

Tested by

no test coverage detected