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

Function SaveVersionInConfig

src/settings.cpp:1222–1228  ·  view source on GitHub ↗

* Save the version of OpenTTD to the ini file. * @param ini the ini to write to */

Source from the content-addressed store, hash-verified

1220 * @param ini the ini to write to
1221 */
1222static void SaveVersionInConfig(IniFile &ini)
1223{
1224 IniGroup &group = ini.GetOrCreateGroup("version");
1225 group.GetOrCreateItem("version_string").SetValue(_openttd_revision);
1226 group.GetOrCreateItem("version_number").SetValue(fmt::format("{:08X}", _openttd_newgrf_version));
1227 group.GetOrCreateItem("ini_version").SetValue(fmt::format("{}", INIFILE_VERSION));
1228}
1229
1230/**
1231 * Save BaseGraphics set selection and configuration.

Callers 1

SaveToConfigFunction · 0.85

Calls 2

formatFunction · 0.50
SetValueMethod · 0.45

Tested by

no test coverage detected