| 226 | } |
| 227 | |
| 228 | void 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) |
| 245 | bool HardwareCursorDefault() |
no test coverage detected