diff options
Diffstat (limited to 'src/yuzu_cmd/config.cpp')
| -rw-r--r-- | src/yuzu_cmd/config.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/yuzu_cmd/config.cpp b/src/yuzu_cmd/config.cpp index d0ae058fd..730956427 100644 --- a/src/yuzu_cmd/config.cpp +++ b/src/yuzu_cmd/config.cpp | |||
| @@ -26,12 +26,12 @@ Config::Config() { | |||
| 26 | Config::~Config() = default; | 26 | Config::~Config() = default; |
| 27 | 27 | ||
| 28 | bool Config::LoadINI(const std::string& default_contents, bool retry) { | 28 | bool Config::LoadINI(const std::string& default_contents, bool retry) { |
| 29 | const char* location = this->sdl2_config_loc.c_str(); | 29 | const std::string& location = this->sdl2_config_loc; |
| 30 | if (sdl2_config->ParseError() < 0) { | 30 | if (sdl2_config->ParseError() < 0) { |
| 31 | if (retry) { | 31 | if (retry) { |
| 32 | LOG_WARNING(Config, "Failed to load {}. Creating file from defaults...", location); | 32 | LOG_WARNING(Config, "Failed to load {}. Creating file from defaults...", location); |
| 33 | FileUtil::CreateFullPath(location); | 33 | FileUtil::CreateFullPath(location); |
| 34 | FileUtil::WriteStringToFile(true, default_contents, location); | 34 | FileUtil::WriteStringToFile(true, location, default_contents); |
| 35 | sdl2_config = std::make_unique<INIReader>(location); // Reopen file | 35 | sdl2_config = std::make_unique<INIReader>(location); // Reopen file |
| 36 | 36 | ||
| 37 | return LoadINI(default_contents, false); | 37 | return LoadINI(default_contents, false); |