diff options
Diffstat (limited to 'src/citra/config.cpp')
| -rw-r--r-- | src/citra/config.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/citra/config.cpp b/src/citra/config.cpp index 9034b188e..6b6617352 100644 --- a/src/citra/config.cpp +++ b/src/citra/config.cpp | |||
| @@ -2,6 +2,8 @@ | |||
| 2 | // Licensed under GPLv2 or any later version | 2 | // Licensed under GPLv2 or any later version |
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | #include <memory> | ||
| 6 | |||
| 5 | #include <inih/cpp/INIReader.h> | 7 | #include <inih/cpp/INIReader.h> |
| 6 | 8 | ||
| 7 | #include <SDL.h> | 9 | #include <SDL.h> |
| @@ -10,7 +12,6 @@ | |||
| 10 | 12 | ||
| 11 | #include "common/file_util.h" | 13 | #include "common/file_util.h" |
| 12 | #include "common/logging/log.h" | 14 | #include "common/logging/log.h" |
| 13 | #include "common/make_unique.h" | ||
| 14 | 15 | ||
| 15 | #include "core/settings.h" | 16 | #include "core/settings.h" |
| 16 | 17 | ||
| @@ -19,7 +20,7 @@ | |||
| 19 | Config::Config() { | 20 | Config::Config() { |
| 20 | // TODO: Don't hardcode the path; let the frontend decide where to put the config files. | 21 | // TODO: Don't hardcode the path; let the frontend decide where to put the config files. |
| 21 | sdl2_config_loc = FileUtil::GetUserPath(D_CONFIG_IDX) + "sdl2-config.ini"; | 22 | sdl2_config_loc = FileUtil::GetUserPath(D_CONFIG_IDX) + "sdl2-config.ini"; |
| 22 | sdl2_config = Common::make_unique<INIReader>(sdl2_config_loc); | 23 | sdl2_config = std::make_unique<INIReader>(sdl2_config_loc); |
| 23 | 24 | ||
| 24 | Reload(); | 25 | Reload(); |
| 25 | } | 26 | } |
| @@ -31,7 +32,7 @@ bool Config::LoadINI(const std::string& default_contents, bool retry) { | |||
| 31 | LOG_WARNING(Config, "Failed to load %s. Creating file from defaults...", location); | 32 | LOG_WARNING(Config, "Failed to load %s. Creating file from defaults...", location); |
| 32 | FileUtil::CreateFullPath(location); | 33 | FileUtil::CreateFullPath(location); |
| 33 | FileUtil::WriteStringToFile(true, default_contents, location); | 34 | FileUtil::WriteStringToFile(true, default_contents, location); |
| 34 | sdl2_config = Common::make_unique<INIReader>(location); // Reopen file | 35 | sdl2_config = std::make_unique<INIReader>(location); // Reopen file |
| 35 | 36 | ||
| 36 | return LoadINI(default_contents, false); | 37 | return LoadINI(default_contents, false); |
| 37 | } | 38 | } |