diff options
| author | kleidis <kleidis1@protonmail.com> | 2025-12-31 21:20:30 +0100 |
|---|---|---|
| committer | crueter <crueter@eden-emu.dev> | 2025-12-31 21:20:30 +0100 |
| commit | b0cd47c005d80d07f6924fd514dd582afa27b25d (patch) | |
| tree | db5b27ac9ed4880a272bdf21b45017872b5af7be /src/frontend_common/config.cpp | |
| parent | 18af560a43ba0d2862ce8781fe1566766bc0dd0a (diff) | |
[qt, android] Implement custom save path setting and migration + Implement custom path settings for Android (#3154)
Needs careful review and especially testing
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3154
Reviewed-by: DraVee <dravee@eden-emu.dev>
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Co-authored-by: kleidis <kleidis1@protonmail.com>
Co-committed-by: kleidis <kleidis1@protonmail.com>
Diffstat (limited to 'src/frontend_common/config.cpp')
| -rw-r--r-- | src/frontend_common/config.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/frontend_common/config.cpp b/src/frontend_common/config.cpp index 94ec349651..669e578b33 100644 --- a/src/frontend_common/config.cpp +++ b/src/frontend_common/config.cpp @@ -290,6 +290,13 @@ void Config::ReadDataStorageValues() { setPath(EdenPath::DumpDir, "dump_directory"); setPath(EdenPath::TASDir, "tas_directory"); + const auto save_dir_setting = ReadStringSetting(std::string("save_directory")); + if (save_dir_setting.empty()) { + SetEdenPath(EdenPath::SaveDir, GetEdenPathString(EdenPath::NANDDir)); + } else { + SetEdenPath(EdenPath::SaveDir, save_dir_setting); + } + ReadCategory(Settings::Category::DataStorage); EndGroup(); @@ -583,6 +590,16 @@ void Config::SaveDataStorageValues() { writePath("dump_directory", EdenPath::DumpDir); writePath("tas_directory", EdenPath::TASDir); + const auto save_path = FS::GetEdenPathString(EdenPath::SaveDir); + const auto nand_path = FS::GetEdenPathString(EdenPath::NANDDir); + if (save_path == nand_path) { + WriteStringSetting(std::string("save_directory"), std::string(""), + std::make_optional(std::string(""))); + } else { + WriteStringSetting(std::string("save_directory"), save_path, + std::make_optional(std::string(""))); + } + WriteCategory(Settings::Category::DataStorage); EndGroup(); |
