MCPcopy Create free account
hub / github.com/OpenMC2/OpenMC2 / save_config

Function save_config

src/Config.cpp:204–220  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

202}
203
204void save_config() {
205 config_tree config;
206
207 config.put("gamepath", config_gamepath, config_tree_path_translator);
208 config.put("window", glo_windowed_mode);
209 config.put("assets", config_assets_name);
210
211 glo_Settings.tree_set_settings(config.put_child("settings", { }));
212
213 config.put("net.main", net_config.main);
214 config.put("net.master", net_config.master);
215 config.put("net.natneg1", net_config.natneg1);
216 config.put("net.natneg2", net_config.natneg2);
217
218 boost::filesystem::path path(get_config_path());
219 boost::property_tree::write_info(boost::filesystem::ofstream(path), config);
220}
221
222boost::filesystem::path config_gamepath;
223std::string config_assets_name;

Callers 1

save_settingsMethod · 0.85

Calls 2

get_config_pathFunction · 0.85
tree_set_settingsMethod · 0.80

Tested by

no test coverage detected