MCPcopy Create free account
hub / github.com/diasurgical/DevilutionX / SaveIni

Function SaveIni

Source/options.cpp:228–242  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

226}
227
228void SaveIni()
229{
230 if (!IniChanged)
231 return;
232 RecursivelyCreateDir(paths::ConfigPath().c_str());
233 const std::string iniPath = GetIniPath();
234 FILE *file = OpenFile(iniPath.c_str(), "wb");
235 if (file != nullptr) {
236 GetIni().SaveFile(file, true);
237 std::fclose(file);
238 } else {
239 LogError("Failed to write ini file to {}: {}", iniPath, std::strerror(errno));
240 }
241 IniChanged = false;
242}
243
244#if SDL_VERSION_ATLEAST(2, 0, 0)
245bool HardwareCursorDefault()

Callers 1

SaveOptionsFunction · 0.85

Calls 4

RecursivelyCreateDirFunction · 0.85
GetIniPathFunction · 0.85
OpenFileFunction · 0.85
LogErrorFunction · 0.85

Tested by

no test coverage detected