From f786802b9b699548d0160cf52dff58018566fd70 Mon Sep 17 00:00:00 2001 From: swurl Date: Thu, 8 May 2025 22:16:07 +0000 Subject: User Data Migration from Citron, Sudachi, and Yuzu (#91) Includes citron, sudachi, yuzu currently broken, because the eden dir is always made early? Signed-off-by: swurl Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/91 Co-authored-by: swurl Co-committed-by: swurl --- src/frontend_common/config.cpp | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'src/frontend_common/config.cpp') diff --git a/src/frontend_common/config.cpp b/src/frontend_common/config.cpp index 326267e774..fa1383436e 100644 --- a/src/frontend_common/config.cpp +++ b/src/frontend_common/config.cpp @@ -25,7 +25,7 @@ Config::Config(const ConfigType config_type) : type(config_type), global{config_type == ConfigType::GlobalConfig} {} void Config::Initialize(const std::string& config_name) { - const std::filesystem::path fs_config_loc = FS::GetYuzuPath(FS::YuzuPath::ConfigDir); + const std::filesystem::path fs_config_loc = FS::GetEdenPath(FS::EdenPath::ConfigDir); const auto config_file = fmt::format("{}.ini", config_name); switch (type) { @@ -51,7 +51,7 @@ void Config::Initialize(const std::string& config_name) { void Config::Initialize(const std::optional config_path) { const std::filesystem::path default_sdl_config_path = - FS::GetYuzuPath(FS::YuzuPath::ConfigDir) / "sdl2-config.ini"; + FS::GetEdenPath(FS::EdenPath::ConfigDir) / "sdl2-config.ini"; config_loc = config_path.value_or(FS::PathToUTF8String(default_sdl_config_path)); void(FS::CreateParentDir(config_loc)); SetUpIni(); @@ -275,11 +275,11 @@ void Config::ReadCoreValues() { void Config::ReadDataStorageValues() { BeginGroup(Settings::TranslateCategory(Settings::Category::DataStorage)); - FS::SetYuzuPath(FS::YuzuPath::NANDDir, ReadStringSetting(std::string("nand_directory"))); - FS::SetYuzuPath(FS::YuzuPath::SDMCDir, ReadStringSetting(std::string("sdmc_directory"))); - FS::SetYuzuPath(FS::YuzuPath::LoadDir, ReadStringSetting(std::string("load_directory"))); - FS::SetYuzuPath(FS::YuzuPath::DumpDir, ReadStringSetting(std::string("dump_directory"))); - FS::SetYuzuPath(FS::YuzuPath::TASDir, ReadStringSetting(std::string("tas_directory"))); + FS::SetEdenPath(FS::EdenPath::NANDDir, ReadStringSetting(std::string("nand_directory"))); + FS::SetEdenPath(FS::EdenPath::SDMCDir, ReadStringSetting(std::string("sdmc_directory"))); + FS::SetEdenPath(FS::EdenPath::LoadDir, ReadStringSetting(std::string("load_directory"))); + FS::SetEdenPath(FS::EdenPath::DumpDir, ReadStringSetting(std::string("dump_directory"))); + FS::SetEdenPath(FS::EdenPath::TASDir, ReadStringSetting(std::string("tas_directory"))); ReadCategory(Settings::Category::DataStorage); @@ -372,7 +372,7 @@ void Config::ReadScreenshotValues() { BeginGroup(Settings::TranslateCategory(Settings::Category::Screenshots)); ReadCategory(Settings::Category::Screenshots); - FS::SetYuzuPath(FS::YuzuPath::ScreenshotsDir, + FS::SetEdenPath(FS::EdenPath::ScreenshotsDir, ReadStringSetting(std::string("screenshot_path"))); EndGroup(); @@ -578,16 +578,16 @@ void Config::SaveCoreValues() { void Config::SaveDataStorageValues() { BeginGroup(Settings::TranslateCategory(Settings::Category::DataStorage)); - WriteStringSetting(std::string("nand_directory"), FS::GetYuzuPathString(FS::YuzuPath::NANDDir), - std::make_optional(FS::GetYuzuPathString(FS::YuzuPath::NANDDir))); - WriteStringSetting(std::string("sdmc_directory"), FS::GetYuzuPathString(FS::YuzuPath::SDMCDir), - std::make_optional(FS::GetYuzuPathString(FS::YuzuPath::SDMCDir))); - WriteStringSetting(std::string("load_directory"), FS::GetYuzuPathString(FS::YuzuPath::LoadDir), - std::make_optional(FS::GetYuzuPathString(FS::YuzuPath::LoadDir))); - WriteStringSetting(std::string("dump_directory"), FS::GetYuzuPathString(FS::YuzuPath::DumpDir), - std::make_optional(FS::GetYuzuPathString(FS::YuzuPath::DumpDir))); - WriteStringSetting(std::string("tas_directory"), FS::GetYuzuPathString(FS::YuzuPath::TASDir), - std::make_optional(FS::GetYuzuPathString(FS::YuzuPath::TASDir))); + WriteStringSetting(std::string("nand_directory"), FS::GetEdenPathString(FS::EdenPath::NANDDir), + std::make_optional(FS::GetEdenPathString(FS::EdenPath::NANDDir))); + WriteStringSetting(std::string("sdmc_directory"), FS::GetEdenPathString(FS::EdenPath::SDMCDir), + std::make_optional(FS::GetEdenPathString(FS::EdenPath::SDMCDir))); + WriteStringSetting(std::string("load_directory"), FS::GetEdenPathString(FS::EdenPath::LoadDir), + std::make_optional(FS::GetEdenPathString(FS::EdenPath::LoadDir))); + WriteStringSetting(std::string("dump_directory"), FS::GetEdenPathString(FS::EdenPath::DumpDir), + std::make_optional(FS::GetEdenPathString(FS::EdenPath::DumpDir))); + WriteStringSetting(std::string("tas_directory"), FS::GetEdenPathString(FS::EdenPath::TASDir), + std::make_optional(FS::GetEdenPathString(FS::EdenPath::TASDir))); WriteCategory(Settings::Category::DataStorage); @@ -681,7 +681,7 @@ void Config::SaveScreenshotValues() { BeginGroup(Settings::TranslateCategory(Settings::Category::Screenshots)); WriteStringSetting(std::string("screenshot_path"), - FS::GetYuzuPathString(FS::YuzuPath::ScreenshotsDir)); + FS::GetEdenPathString(FS::EdenPath::ScreenshotsDir)); WriteCategory(Settings::Category::Screenshots); EndGroup(); -- cgit v1.2.3