mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-10-18 10:47:55 +00:00
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 <swurl@swurl.xyz> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/91 Co-authored-by: swurl <swurl@swurl.xyz> Co-committed-by: swurl <swurl@swurl.xyz>
This commit is contained in:
parent
d659d6f5b4
commit
f786802b9b
62 changed files with 703 additions and 384 deletions
|
@ -21,7 +21,7 @@ ConfigureDebug::ConfigureDebug(const Core::System& system_, QWidget* parent)
|
|||
|
||||
connect(ui->open_log_button, &QPushButton::clicked, []() {
|
||||
const auto path =
|
||||
QString::fromStdString(Common::FS::GetYuzuPathString(Common::FS::YuzuPath::LogDir));
|
||||
QString::fromStdString(Common::FS::GetEdenPathString(Common::FS::EdenPath::LogDir));
|
||||
QDesktopServices::openUrl(QUrl::fromLocalFile(path));
|
||||
});
|
||||
|
||||
|
|
|
@ -47,15 +47,15 @@ void ConfigureFilesystem::changeEvent(QEvent* event) {
|
|||
|
||||
void ConfigureFilesystem::SetConfiguration() {
|
||||
ui->nand_directory_edit->setText(
|
||||
QString::fromStdString(Common::FS::GetYuzuPathString(Common::FS::YuzuPath::NANDDir)));
|
||||
QString::fromStdString(Common::FS::GetEdenPathString(Common::FS::EdenPath::NANDDir)));
|
||||
ui->sdmc_directory_edit->setText(
|
||||
QString::fromStdString(Common::FS::GetYuzuPathString(Common::FS::YuzuPath::SDMCDir)));
|
||||
QString::fromStdString(Common::FS::GetEdenPathString(Common::FS::EdenPath::SDMCDir)));
|
||||
ui->gamecard_path_edit->setText(
|
||||
QString::fromStdString(Settings::values.gamecard_path.GetValue()));
|
||||
ui->dump_path_edit->setText(
|
||||
QString::fromStdString(Common::FS::GetYuzuPathString(Common::FS::YuzuPath::DumpDir)));
|
||||
QString::fromStdString(Common::FS::GetEdenPathString(Common::FS::EdenPath::DumpDir)));
|
||||
ui->load_path_edit->setText(
|
||||
QString::fromStdString(Common::FS::GetYuzuPathString(Common::FS::YuzuPath::LoadDir)));
|
||||
QString::fromStdString(Common::FS::GetEdenPathString(Common::FS::EdenPath::LoadDir)));
|
||||
|
||||
ui->gamecard_inserted->setChecked(Settings::values.gamecard_inserted.GetValue());
|
||||
ui->gamecard_current_game->setChecked(Settings::values.gamecard_current_game.GetValue());
|
||||
|
@ -68,13 +68,13 @@ void ConfigureFilesystem::SetConfiguration() {
|
|||
}
|
||||
|
||||
void ConfigureFilesystem::ApplyConfiguration() {
|
||||
Common::FS::SetYuzuPath(Common::FS::YuzuPath::NANDDir,
|
||||
Common::FS::SetEdenPath(Common::FS::EdenPath::NANDDir,
|
||||
ui->nand_directory_edit->text().toStdString());
|
||||
Common::FS::SetYuzuPath(Common::FS::YuzuPath::SDMCDir,
|
||||
Common::FS::SetEdenPath(Common::FS::EdenPath::SDMCDir,
|
||||
ui->sdmc_directory_edit->text().toStdString());
|
||||
Common::FS::SetYuzuPath(Common::FS::YuzuPath::DumpDir,
|
||||
Common::FS::SetEdenPath(Common::FS::EdenPath::DumpDir,
|
||||
ui->dump_path_edit->text().toStdString());
|
||||
Common::FS::SetYuzuPath(Common::FS::YuzuPath::LoadDir,
|
||||
Common::FS::SetEdenPath(Common::FS::EdenPath::LoadDir,
|
||||
ui->load_path_edit->text().toStdString());
|
||||
|
||||
Settings::values.gamecard_inserted = ui->gamecard_inserted->isChecked();
|
||||
|
@ -126,12 +126,12 @@ void ConfigureFilesystem::SetDirectory(DirectoryTarget target, QLineEdit* edit)
|
|||
}
|
||||
|
||||
void ConfigureFilesystem::ResetMetadata() {
|
||||
if (!Common::FS::Exists(Common::FS::GetYuzuPath(Common::FS::YuzuPath::CacheDir) /
|
||||
if (!Common::FS::Exists(Common::FS::GetEdenPath(Common::FS::EdenPath::CacheDir) /
|
||||
"game_list/")) {
|
||||
QMessageBox::information(this, tr("Reset Metadata Cache"),
|
||||
tr("The metadata cache is already empty."));
|
||||
} else if (Common::FS::RemoveDirRecursively(
|
||||
Common::FS::GetYuzuPath(Common::FS::YuzuPath::CacheDir) / "game_list")) {
|
||||
Common::FS::GetEdenPath(Common::FS::EdenPath::CacheDir) / "game_list")) {
|
||||
QMessageBox::information(this, tr("Reset Metadata Cache"),
|
||||
tr("The operation completed successfully."));
|
||||
UISettings::values.is_game_list_reload_pending.exchange(true);
|
||||
|
|
|
@ -80,7 +80,7 @@ void ConfigurePerGameAddons::ApplyConfiguration() {
|
|||
std::sort(disabled_addons.begin(), disabled_addons.end());
|
||||
std::sort(current.begin(), current.end());
|
||||
if (disabled_addons != current) {
|
||||
Common::FS::RemoveFile(Common::FS::GetYuzuPath(Common::FS::YuzuPath::CacheDir) /
|
||||
Common::FS::RemoveFile(Common::FS::GetEdenPath(Common::FS::EdenPath::CacheDir) /
|
||||
"game_list" / fmt::format("{:016X}.pv.txt", title_id));
|
||||
}
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ constexpr std::array<u8, 107> backup_jpeg{
|
|||
|
||||
QString GetImagePath(const Common::UUID& uuid) {
|
||||
const auto path =
|
||||
Common::FS::GetYuzuPath(Common::FS::YuzuPath::NANDDir) /
|
||||
Common::FS::GetEdenPath(Common::FS::EdenPath::NANDDir) /
|
||||
fmt::format("system/save/8000000000000010/su/avators/{}.jpg", uuid.FormattedString());
|
||||
return QString::fromStdString(Common::FS::PathToUTF8String(path));
|
||||
}
|
||||
|
@ -288,7 +288,7 @@ void ConfigureProfileManager::SetUserImage() {
|
|||
}
|
||||
|
||||
const auto raw_path = QString::fromStdString(Common::FS::PathToUTF8String(
|
||||
Common::FS::GetYuzuPath(Common::FS::YuzuPath::NANDDir) / "system/save/8000000000000010"));
|
||||
Common::FS::GetEdenPath(Common::FS::EdenPath::NANDDir) / "system/save/8000000000000010"));
|
||||
const QFileInfo raw_info{raw_path};
|
||||
if (raw_info.exists() && !raw_info.isDir() && !QFile::remove(raw_path)) {
|
||||
QMessageBox::warning(this, tr("Error deleting file"),
|
||||
|
|
|
@ -28,14 +28,14 @@ ConfigureTasDialog::~ConfigureTasDialog() = default;
|
|||
|
||||
void ConfigureTasDialog::LoadConfiguration() {
|
||||
ui->tas_path_edit->setText(
|
||||
QString::fromStdString(Common::FS::GetYuzuPathString(Common::FS::YuzuPath::TASDir)));
|
||||
QString::fromStdString(Common::FS::GetEdenPathString(Common::FS::EdenPath::TASDir)));
|
||||
ui->tas_enable->setChecked(Settings::values.tas_enable.GetValue());
|
||||
ui->tas_loop_script->setChecked(Settings::values.tas_loop.GetValue());
|
||||
ui->tas_pause_on_load->setChecked(Settings::values.pause_tas_on_load.GetValue());
|
||||
}
|
||||
|
||||
void ConfigureTasDialog::ApplyConfiguration() {
|
||||
Common::FS::SetYuzuPath(Common::FS::YuzuPath::TASDir, ui->tas_path_edit->text().toStdString());
|
||||
Common::FS::SetEdenPath(Common::FS::EdenPath::TASDir, ui->tas_path_edit->text().toStdString());
|
||||
Settings::values.tas_enable.SetValue(ui->tas_enable->isChecked());
|
||||
Settings::values.tas_loop.SetValue(ui->tas_loop_script->isChecked());
|
||||
Settings::values.pause_tas_on_load.SetValue(ui->tas_pause_on_load->isChecked());
|
||||
|
|
|
@ -144,8 +144,8 @@ ConfigureUi::ConfigureUi(Core::System& system_, QWidget* parent)
|
|||
connect(ui->screenshot_path_button, &QToolButton::pressed, this, [this] {
|
||||
auto dir =
|
||||
QFileDialog::getExistingDirectory(this, tr("Select Screenshots Path..."),
|
||||
QString::fromStdString(Common::FS::GetYuzuPathString(
|
||||
Common::FS::YuzuPath::ScreenshotsDir)));
|
||||
QString::fromStdString(Common::FS::GetEdenPathString(
|
||||
Common::FS::EdenPath::ScreenshotsDir)));
|
||||
if (!dir.isEmpty()) {
|
||||
if (dir.back() != QChar::fromLatin1('/')) {
|
||||
dir.append(QChar::fromLatin1('/'));
|
||||
|
@ -176,7 +176,7 @@ void ConfigureUi::ApplyConfiguration() {
|
|||
UISettings::values.row_2_text_id = ui->row_2_text_combobox->currentData().toUInt();
|
||||
|
||||
UISettings::values.enable_screenshot_save_as = ui->enable_screenshot_save_as->isChecked();
|
||||
Common::FS::SetYuzuPath(Common::FS::YuzuPath::ScreenshotsDir,
|
||||
Common::FS::SetEdenPath(Common::FS::EdenPath::ScreenshotsDir,
|
||||
ui->screenshot_path_edit->text().toStdString());
|
||||
|
||||
const u32 height = ScreenshotDimensionToInt(ui->screenshot_height->currentText());
|
||||
|
@ -208,7 +208,7 @@ void ConfigureUi::SetConfiguration() {
|
|||
ui->enable_screenshot_save_as->setChecked(
|
||||
UISettings::values.enable_screenshot_save_as.GetValue());
|
||||
ui->screenshot_path_edit->setText(QString::fromStdString(
|
||||
Common::FS::GetYuzuPathString(Common::FS::YuzuPath::ScreenshotsDir)));
|
||||
Common::FS::GetEdenPathString(Common::FS::EdenPath::ScreenshotsDir)));
|
||||
|
||||
const auto height = UISettings::values.screenshot_height.GetValue();
|
||||
if (height == 0) {
|
||||
|
|
|
@ -14,7 +14,7 @@ namespace FS = Common::FS;
|
|||
namespace {
|
||||
|
||||
bool ProfileExistsInFilesystem(std::string_view profile_name) {
|
||||
return FS::Exists(FS::GetYuzuPath(FS::YuzuPath::ConfigDir) / "input" /
|
||||
return FS::Exists(FS::GetEdenPath(FS::EdenPath::ConfigDir) / "input" /
|
||||
fmt::format("{}.ini", profile_name));
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,7 @@ std::filesystem::path GetNameWithoutExtension(std::filesystem::path filename) {
|
|||
} // namespace
|
||||
|
||||
InputProfiles::InputProfiles() {
|
||||
const auto input_profile_loc = FS::GetYuzuPath(FS::YuzuPath::ConfigDir) / "input";
|
||||
const auto input_profile_loc = FS::GetEdenPath(FS::EdenPath::ConfigDir) / "input";
|
||||
|
||||
if (!FS::IsDir(input_profile_loc)) {
|
||||
return;
|
||||
|
|
|
@ -46,6 +46,7 @@ const std::array<int, 2> QtConfig::default_ringcon_analogs{{
|
|||
|
||||
QtConfig::QtConfig(const std::string& config_name, const ConfigType config_type)
|
||||
: Config(config_type) {
|
||||
|
||||
Initialize(config_name);
|
||||
if (config_type != ConfigType::InputProfile) {
|
||||
ReadQtValues();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue