Browse Source

Revert "[qt] Ryujinx save data link (#2815)"

This reverts commit 39f226a853.
pull/3309/head
DraVee 4 weeks ago
parent
commit
95a653b114
  1. 2
      src/common/CMakeLists.txt
  2. 1
      src/common/fs/fs_paths.h
  3. 33
      src/common/fs/path_util.cpp
  4. 18
      src/common/fs/path_util.h
  5. 12
      src/frontend_common/data_manager.cpp
  6. 4
      src/frontend_common/data_manager.h
  7. 3
      src/qt_common/CMakeLists.txt
  8. 2
      src/qt_common/abstract/qt_frontend_util.cpp
  9. 6
      src/qt_common/abstract/qt_frontend_util.h
  10. 10
      src/qt_common/qt_common.cpp
  11. 15
      src/qt_common/qt_string_lookup.h
  12. 6
      src/qt_common/util/content.cpp
  13. 9
      src/qt_common/util/content.h
  14. 2
      src/qt_common/util/game.cpp
  15. 2
      src/qt_common/util/path.cpp
  16. 3
      src/yuzu/CMakeLists.txt
  17. 2
      src/yuzu/data_dialog.cpp
  18. 4
      src/yuzu/game_list.cpp
  19. 1
      src/yuzu/game_list.h
  20. 4799
      src/yuzu/main.cpp
  21. 1
      src/yuzu/main_window.h
  22. 9
      src/yuzu/migration_worker.cpp
  23. 6
      src/yuzu/migration_worker.h
  24. 32
      src/yuzu/ryujinx_dialog.h
  25. 81
      src/yuzu/ryujinx_dialog.ui

2
src/common/CMakeLists.txt

@ -151,8 +151,6 @@ add_library(
wall_clock.h
zstd_compression.cpp
zstd_compression.h
fs/ryujinx_compat.h fs/ryujinx_compat.cpp
fs/symlink.h fs/symlink.cpp
)
if(WIN32)

1
src/common/fs/fs_paths.h

@ -33,7 +33,6 @@
#define SUDACHI_DIR "sudachi"
#define YUZU_DIR "yuzu"
#define SUYU_DIR "suyu"
#define RYUJINX_DIR "Ryujinx"
// yuzu-specific files
#define LOG_FILE "eden_log.txt"

33
src/common/fs/path_util.cpp

@ -84,7 +84,7 @@ public:
return eden_paths.at(eden_path);
}
[[nodiscard]] const fs::path& GetLegacyPathImpl(EmuPath legacy_path) {
[[nodiscard]] const fs::path& GetLegacyPathImpl(LegacyPath legacy_path) {
return legacy_paths.at(legacy_path);
}
@ -98,7 +98,7 @@ public:
eden_paths.insert_or_assign(eden_path, new_path);
}
void SetLegacyPathImpl(EmuPath legacy_path, const fs::path& new_path) {
void SetLegacyPathImpl(LegacyPath legacy_path, const fs::path& new_path) {
legacy_paths.insert_or_assign(legacy_path, new_path);
}
@ -118,9 +118,9 @@ public:
}
eden_path_cache = eden_path / CACHE_DIR;
eden_path_config = eden_path / CONFIG_DIR;
#define LEGACY_PATH(titleName, upperName) GenerateLegacyPath(EmuPath::titleName##Dir, GetAppDataRoamingDirectory() / upperName##_DIR); \
GenerateLegacyPath(EmuPath::titleName##ConfigDir, GetAppDataRoamingDirectory() / upperName##_DIR / CONFIG_DIR); \
GenerateLegacyPath(EmuPath::titleName##CacheDir, GetAppDataRoamingDirectory() / upperName##_DIR / CACHE_DIR);
#define LEGACY_PATH(titleName, upperName) GenerateLegacyPath(LegacyPath::titleName##Dir, GetAppDataRoamingDirectory() / upperName##_DIR); \
GenerateLegacyPath(LegacyPath::titleName##ConfigDir, GetAppDataRoamingDirectory() / upperName##_DIR / CONFIG_DIR); \
GenerateLegacyPath(LegacyPath::titleName##CacheDir, GetAppDataRoamingDirectory() / upperName##_DIR / CACHE_DIR);
LEGACY_PATH(Citron, CITRON)
LEGACY_PATH(Sudachi, SUDACHI)
LEGACY_PATH(Yuzu, YUZU)
@ -140,9 +140,9 @@ public:
eden_path_cache = eden_path / CACHE_DIR;
eden_path_config = eden_path / CONFIG_DIR;
}
#define LEGACY_PATH(titleName, upperName) GenerateLegacyPath(EmuPath::titleName##Dir, GetDataDirectory("XDG_DATA_HOME") / upperName##_DIR); \
GenerateLegacyPath(EmuPath::titleName##ConfigDir, GetDataDirectory("XDG_CONFIG_HOME") / upperName##_DIR); \
GenerateLegacyPath(EmuPath::titleName##CacheDir, GetDataDirectory("XDG_CACHE_HOME") / upperName##_DIR);
#define LEGACY_PATH(titleName, upperName) GenerateLegacyPath(LegacyPath::titleName##Dir, GetDataDirectory("XDG_DATA_HOME") / upperName##_DIR); \
GenerateLegacyPath(LegacyPath::titleName##ConfigDir, GetDataDirectory("XDG_CONFIG_HOME") / upperName##_DIR); \
GenerateLegacyPath(LegacyPath::titleName##CacheDir, GetDataDirectory("XDG_CACHE_HOME") / upperName##_DIR);
LEGACY_PATH(Citron, CITRON)
LEGACY_PATH(Sudachi, SUDACHI)
LEGACY_PATH(Yuzu, YUZU)
@ -166,15 +166,6 @@ public:
GenerateEdenPath(EdenPath::ShaderDir, eden_path / SHADER_DIR);
GenerateEdenPath(EdenPath::TASDir, eden_path / TAS_DIR);
GenerateEdenPath(EdenPath::IconsDir, eden_path / ICONS_DIR);
#ifdef _WIN32
GenerateLegacyPath(EmuPath::RyujinxDir, GetAppDataRoamingDirectory() / RYUJINX_DIR);
#else
// In Ryujinx's infinite wisdom, it places EVERYTHING in the config directory on UNIX
// This is incredibly stupid and violates a million XDG standards, but whatever
GenerateLegacyPath(EmuPath::RyujinxDir, GetDataDirectory("XDG_CONFIG_HOME") / RYUJINX_DIR);
#endif
}
private:
@ -189,12 +180,12 @@ private:
SetEdenPathImpl(eden_path, new_path);
}
void GenerateLegacyPath(EmuPath legacy_path, const fs::path& new_path) {
void GenerateLegacyPath(LegacyPath legacy_path, const fs::path& new_path) {
SetLegacyPathImpl(legacy_path, new_path);
}
std::unordered_map<EdenPath, fs::path> eden_paths;
std::unordered_map<EmuPath, fs::path> legacy_paths;
std::unordered_map<LegacyPath, fs::path> legacy_paths;
};
bool ValidatePath(const fs::path& path) {
@ -282,7 +273,7 @@ const fs::path& GetEdenPath(EdenPath eden_path) {
return PathManagerImpl::GetInstance().GetEdenPathImpl(eden_path);
}
const std::filesystem::path& GetLegacyPath(EmuPath legacy_path) {
const std::filesystem::path& GetLegacyPath(LegacyPath legacy_path) {
return PathManagerImpl::GetInstance().GetLegacyPathImpl(legacy_path);
}
@ -290,7 +281,7 @@ std::string GetEdenPathString(EdenPath eden_path) {
return PathToUTF8String(GetEdenPath(eden_path));
}
std::string GetLegacyPathString(EmuPath legacy_path) {
std::string GetLegacyPathString(LegacyPath legacy_path) {
return PathToUTF8String(GetLegacyPath(legacy_path));
}

18
src/common/fs/path_util.h

@ -33,26 +33,22 @@ enum class EdenPath {
IconsDir, // Where Icons for Windows shortcuts are stored.
};
// migration/compat dirs
enum EmuPath {
CitronDir,
enum LegacyPath {
CitronDir, // Citron Directories for migration
CitronConfigDir,
CitronCacheDir,
SudachiDir,
SudachiDir, // Sudachi Directories for migration
SudachiConfigDir,
SudachiCacheDir,
YuzuDir,
YuzuDir, // Yuzu Directories for migration
YuzuConfigDir,
YuzuCacheDir,
SuyuDir,
SuyuDir, // Suyu Directories for migration
SuyuConfigDir,
SuyuCacheDir,
// used exclusively for save data linking
RyujinxDir,
};
/**
@ -234,7 +230,7 @@ void SetAppDirectory(const std::string& app_directory);
*
* @returns The filesystem path associated with the LegacyPath enum.
*/
[[nodiscard]] const std::filesystem::path& GetLegacyPath(EmuPath legacy_path);
[[nodiscard]] const std::filesystem::path& GetLegacyPath(LegacyPath legacy_path);
/**
* Gets the filesystem path associated with the EdenPath enum as a UTF-8 encoded std::string.
@ -252,7 +248,7 @@ void SetAppDirectory(const std::string& app_directory);
*
* @returns The filesystem path associated with the LegacyPath enum as a UTF-8 encoded std::string.
*/
[[nodiscard]] std::string GetLegacyPathString(EmuPath legacy_path);
[[nodiscard]] std::string GetLegacyPathString(LegacyPath legacy_path);
/**
* Sets a new filesystem path associated with the EdenPath enum.

12
src/frontend_common/data_manager.cpp

@ -4,13 +4,14 @@
#include "data_manager.h"
#include "common/assert.h"
#include "common/fs/path_util.h"
#include <filesystem>
#include <fmt/format.h>
namespace FrontendCommon::DataManager {
namespace fs = std::filesystem;
const fs::path GetDataDir(DataDir dir, const std::string &user_id)
const std::string GetDataDir(DataDir dir, const std::string &user_id)
{
const fs::path nand_dir = Common::FS::GetEdenPath(Common::FS::EdenPath::NANDDir);
const fs::path save_dir = Common::FS::GetEdenPath(Common::FS::EdenPath::SaveDir);
@ -35,11 +36,6 @@ const fs::path GetDataDir(DataDir dir, const std::string &user_id)
return "";
}
const std::string GetDataDirString(DataDir dir, const std::string &user_id)
{
return GetDataDir(dir, user_id).string();
}
u64 ClearDir(DataDir dir, const std::string &user_id)
{
fs::path data_dir = GetDataDir(dir, user_id);
@ -67,7 +63,7 @@ u64 DataDirSize(DataDir dir)
if (!fs::exists(data_dir))
return 0;
for (const auto &entry : fs::recursive_directory_iterator(data_dir)) {
for (const auto& entry : fs::recursive_directory_iterator(data_dir)) {
if (!entry.is_directory()) {
size += entry.file_size();
}
@ -76,4 +72,4 @@ u64 DataDirSize(DataDir dir)
return size;
}
} // namespace FrontendCommon::DataManager
}

4
src/frontend_common/data_manager.h

@ -6,14 +6,12 @@
#include "common/common_types.h"
#include <string>
#include <filesystem>
namespace FrontendCommon::DataManager {
enum class DataDir { Saves, UserNand, SysNand, Mods, Shaders };
const std::filesystem::path GetDataDir(DataDir dir, const std::string &user_id = "");
const std::string GetDataDirString(DataDir dir, const std::string &user_id = "");
const std::string GetDataDir(DataDir dir, const std::string &user_id = "");
u64 ClearDir(DataDir dir, const std::string &user_id = "");
std::string ReadableBytesSize(u64 size) noexcept;

3
src/qt_common/CMakeLists.txt

@ -23,14 +23,13 @@ add_library(qt_common STATIC
util/applet.h util/applet.cpp
util/compress.h util/compress.cpp
abstract/frontend.h abstract/frontend.cpp
abstract/qt_frontend_util.h abstract/qt_frontend_util.cpp
abstract/qt_progress_dialog.h abstract/qt_progress_dialog.cpp
qt_string_lookup.h
qt_compat.h
discord/discord.h
util/fs.h util/fs.cpp
)
if (UNIX)

2
src/qt_common/abstract/frontend.cpp → src/qt_common/abstract/qt_frontend_util.cpp

@ -1,7 +1,7 @@
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
#include "frontend.h"
#include "qt_frontend_util.h"
#include "qt_common/qt_common.h"
#ifdef YUZU_QT_WIDGETS

6
src/qt_common/abstract/frontend.h → src/qt_common/abstract/qt_frontend_util.h

@ -1,8 +1,8 @@
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
#ifndef FRONTEND_H
#define FRONTEND_H
#ifndef QT_FRONTEND_UTIL_H
#define QT_FRONTEND_UTIL_H
#include <QGuiApplication>
#include "qt_common/qt_common.h"
@ -140,4 +140,4 @@ const QString GetExistingDirectory(const QString &caption = QString(),
Options options = Option::ShowDirsOnly);
} // namespace QtCommon::Frontend
#endif // FRONTEND_H
#endif // QT_FRONTEND_UTIL_H

10
src/qt_common/qt_common.cpp

@ -3,14 +3,11 @@
#include "qt_common.h"
#include "common/fs/fs.h"
#include "common/fs/ryujinx_compat.h"
#include <QGuiApplication>
#include <QStringLiteral>
#include "common/logging/log.h"
#include "core/frontend/emu_window.h"
#include "qt_common/abstract/frontend.h"
#include "qt_common/qt_string_lookup.h"
#include <QFile>
@ -36,8 +33,7 @@ std::unique_ptr<Core::System> system = nullptr;
std::shared_ptr<FileSys::RealVfsFilesystem> vfs = nullptr;
std::unique_ptr<FileSys::ManualContentProvider> provider = nullptr;
Core::Frontend::WindowSystemType GetWindowSystemType()
{
Core::Frontend::WindowSystemType GetWindowSystemType() {
// Determine WSI type based on Qt platform.
QString platform_name = QGuiApplication::platformName();
if (platform_name == QStringLiteral("windows"))
@ -105,11 +101,9 @@ void Init(QObject* root)
provider = std::make_unique<FileSys::ManualContentProvider>();
}
std::filesystem::path GetEdenCommand()
{
std::filesystem::path GetEdenCommand() {
std::filesystem::path command;
// TODO: flatpak?
QString appimage = QString::fromLocal8Bit(getenv("APPIMAGE"));
if (!appimage.isEmpty()) {
command = std::filesystem::path{appimage.toStdString()};

15
src/qt_common/qt_string_lookup.h

@ -52,6 +52,7 @@ enum StringKey {
MigrationTooltipClearOld,
MigrationTooltipLinkOld,
<<<<<<< HEAD
// ryujinx
KvdbNonexistent,
KvdbNoHeader,
@ -66,6 +67,12 @@ enum StringKey {
static const constexpr frozen::map<StringKey, frozen::string, 29> strings = {
// 0-4
{DataManagerSavesTooltip,
=======
};
static const frozen::map<StringKey, frozen::string, 21> strings = {
{SavesTooltip,
>>>>>>> parent of 39f226a853 ([qt] Ryujinx save data link (#2815))
QT_TR_NOOP("Contains game save data. DO NOT REMOVE UNLESS YOU KNOW WHAT YOU'RE DOING!")},
{DataManagerShadersTooltip,
QT_TR_NOOP("Contains Vulkan and OpenGL pipeline caches. Generally safe to remove.")},
@ -74,7 +81,6 @@ static const constexpr frozen::map<StringKey, frozen::string, 29> strings = {
{DataManagerModsTooltip, QT_TR_NOOP("Contains game mods, patches, and cheats.")},
// Key install
// 5-9
{KeyInstallSuccess, QT_TR_NOOP("Decryption Keys were successfully installed")},
{KeyInstallInvalidDir, QT_TR_NOOP("Unable to read key directory, aborting")},
{KeyInstallErrorFailedCopy, QT_TR_NOOP("One or more keys failed to copy.")},
@ -86,7 +92,6 @@ static const constexpr frozen::map<StringKey, frozen::string, 29> strings = {
"re-dump keys.")},
// fw install
// 10-14
{FwInstallSuccess, QT_TR_NOOP("Successfully installed firmware version %1")},
{FwInstallNoNCAs, QT_TR_NOOP("Unable to locate potential firmware NCA files")},
{FwInstallFailedDelete, QT_TR_NOOP("Failed to delete one or more firmware files.")},
@ -106,7 +111,10 @@ static const constexpr frozen::map<StringKey, frozen::string, 29> strings = {
"redump firmware if necessary.")},
// migrator
<<<<<<< HEAD
// 17-22
=======
>>>>>>> parent of 39f226a853 ([qt] Ryujinx save data link (#2815))
{MigrationPromptPrefix, QT_TR_NOOP("Eden has detected user data for the following emulators:")},
{MigrationPrompt,
QT_TR_NOOP("Would you like to migrate your data for use in Eden?\n"
@ -125,6 +133,7 @@ static const constexpr frozen::map<StringKey, frozen::string, 29> strings = {
{MigrationTooltipLinkOld,
QT_TR_NOOP("Creates a filesystem link between the old directory and Eden directory.\n"
"This is recommended if you want to share data between emulators.")},
<<<<<<< HEAD
// why am I writing these comments again
// 23-28
@ -134,6 +143,8 @@ static const constexpr frozen::map<StringKey, frozen::string, 29> strings = {
{KvdbMisaligned, QT_TR_NOOP("Invalid byte alignment on Ryujinx title database.")},
{KvdbNoImens, QT_TR_NOOP("No items found in Ryujinx title database.")},
{RyujinxNoSaveId, QT_TR_NOOP("Title %1 not found in Ryujinx title database.")},
=======
>>>>>>> parent of 39f226a853 ([qt] Ryujinx save data link (#2815))
};
static inline const QString Lookup(StringKey key)

6
src/qt_common/util/content.cpp

@ -11,7 +11,7 @@
#include "frontend_common/firmware_manager.h"
#include "compress.h"
#include "qt_common/abstract/frontend.h"
#include "qt_common/abstract/qt_frontend_util.h"
#include "qt_common/abstract/qt_progress_dialog.h"
#include "qt_common/qt_common.h"
@ -405,7 +405,7 @@ void ExportDataDir(FrontendCommon::DataManager::DataDir data_dir,
std::function<void()> callback)
{
using namespace QtCommon::Frontend;
const std::string dir = FrontendCommon::DataManager::GetDataDirString(data_dir, user_id);
const std::string dir = FrontendCommon::DataManager::GetDataDir(data_dir, user_id);
const QString zip_dump_location = GetSaveFileName(tr("Select Export Location"),
tr("%1.zip").arg(name),
@ -469,7 +469,7 @@ void ImportDataDir(FrontendCommon::DataManager::DataDir data_dir,
const std::string& user_id,
std::function<void()> callback)
{
const std::string dir = FrontendCommon::DataManager::GetDataDirString(data_dir, user_id);
const std::string dir = FrontendCommon::DataManager::GetDataDir(data_dir, user_id);
using namespace QtCommon::Frontend;

9
src/qt_common/util/content.h

@ -25,7 +25,11 @@ enum class FirmwareInstallResult {
inline const QString GetFirmwareInstallResultString(FirmwareInstallResult result)
{
<<<<<<< HEAD
return LOOKUP_ENUM(result, FwInstallSuccess);
=======
return QtCommon::StringLookup::Lookup(static_cast<StringLookup::StringKey>((int) result + (int) QtCommon::StringLookup::FwInstallSuccess));
>>>>>>> parent of 39f226a853 ([qt] Ryujinx save data link (#2815))
}
/**
@ -35,7 +39,12 @@ inline const QString GetFirmwareInstallResultString(FirmwareInstallResult result
*/
inline const QString GetKeyInstallResultString(FirmwareManager::KeyInstallResult result)
{
<<<<<<< HEAD
return LOOKUP_ENUM(result, KeyInstallSuccess);
=======
// this can probably be made into a common function of sorts
return QtCommon::StringLookup::Lookup(static_cast<StringLookup::StringKey>((int) result + (int) QtCommon::StringLookup::KeyInstallSuccess));
>>>>>>> parent of 39f226a853 ([qt] Ryujinx save data link (#2815))
}
void InstallFirmware(const QString &location, bool recursive);

2
src/qt_common/util/game.cpp

@ -8,7 +8,7 @@
#include "core/file_sys/savedata_factory.h"
#include "core/hle/service/am/am_types.h"
#include "frontend_common/content_manager.h"
#include "qt_common/abstract/frontend.h"
#include "qt_common/abstract/qt_frontend_util.h"
#include "qt_common/config/uisettings.h"
#include "qt_common/qt_common.h"
#include "yuzu/util/util.h"

2
src/qt_common/util/path.cpp

@ -7,7 +7,7 @@
#include <QUrl>
#include "common/fs/fs.h"
#include "common/fs/path_util.h"
#include "qt_common/abstract/frontend.h"
#include "qt_common/abstract/qt_frontend_util.h"
#include <fmt/format.h>
namespace QtCommon::Path {

3
src/yuzu/CMakeLists.txt

@ -233,8 +233,11 @@ add_executable(yuzu
data_dialog.h data_dialog.cpp data_dialog.ui
data_widget.ui
<<<<<<< HEAD
ryujinx_dialog.h ryujinx_dialog.cpp ryujinx_dialog.ui
main_window.h main_window.cpp
=======
>>>>>>> parent of 39f226a853 ([qt] Ryujinx save data link (#2815))
)
set_target_properties(yuzu PROPERTIES OUTPUT_NAME "eden")

2
src/yuzu/data_dialog.cpp

@ -89,7 +89,7 @@ void DataWidget::open()
{
std::string user_id = selectProfile();
QDesktopServices::openUrl(QUrl::fromLocalFile(
QString::fromStdString(FrontendCommon::DataManager::GetDataDirString(m_dir, user_id))));
QString::fromStdString(FrontendCommon::DataManager::GetDataDir(m_dir, user_id))));
}
void DataWidget::upload()

4
src/yuzu/game_list.cpp

@ -542,7 +542,6 @@ void GameList::PopupContextMenu(const QPoint& menu_location) {
}
void GameList::AddGamePopup(QMenu& context_menu, u64 program_id, const std::string& path) {
// TODO(crueter): Refactor this and make it less bad
QAction* favorite = context_menu.addAction(tr("Favorite"));
context_menu.addSeparator();
QAction* start_game = context_menu.addAction(tr("Start Game"));
@ -664,9 +663,6 @@ void GameList::AddGamePopup(QMenu& context_menu, u64 program_id, const std::stri
#endif
connect(properties, &QAction::triggered,
[this, path]() { emit OpenPerGameGeneralRequested(path); });
connect(ryujinx, &QAction::triggered, [this, program_id]() { emit LinkToRyujinxRequested(program_id);
});
};
void GameList::AddCustomDirPopup(QMenu& context_menu, QModelIndex selected) {

1
src/yuzu/game_list.h

@ -113,7 +113,6 @@ signals:
void NavigateToGamedbEntryRequested(u64 program_id,
const CompatibilityList& compatibility_list);
void OpenPerGameGeneralRequested(const std::string& file);
void LinkToRyujinxRequested(const u64 &program_id);
void OpenDirectory(const QString& directory);
void AddDirectory();
void ShowList(bool show);

4799
src/yuzu/main.cpp
File diff suppressed because it is too large
View File

1
src/yuzu/main_window.h

@ -354,7 +354,6 @@ private slots:
void OnGameListAddDirectory();
void OnGameListShowList(bool show);
void OnGameListOpenPerGameProperties(const std::string& file);
void OnLinkToRyujinx(const u64& program_id);
void OnMenuLoadFile();
void OnMenuLoadFolder();
void IncrementInstallProgress();

9
src/yuzu/migration_worker.cpp

@ -2,7 +2,6 @@
// SPDX-License-Identifier: GPL-3.0-or-later
#include "migration_worker.h"
#include "common/fs/symlink.h"
#include <QMap>
#include <boost/algorithm/string/predicate.hpp>
@ -43,7 +42,7 @@ void MigrationWorker::process()
try {
fs::remove_all(eden_dir);
} catch (fs::filesystem_error &_) {
// ignore because linux does stupid crap sometimes
// ignore because linux does stupid crap sometimes.
}
switch (strategy) {
@ -52,7 +51,7 @@ void MigrationWorker::process()
// Windows 11 has random permission nonsense to deal with.
try {
Common::FS::CreateSymlink(legacy_user_dir, eden_dir);
fs::create_directory_symlink(legacy_user_dir, eden_dir);
} catch (const fs::filesystem_error &e) {
emit error(tr("Linking the old directory failed. You may need to re-run with "
"administrative privileges on Windows.\nOS gave error: %1")
@ -64,11 +63,11 @@ void MigrationWorker::process()
// are already children of the root directory
#ifndef WIN32
if (fs::is_directory(legacy_config_dir)) {
Common::FS::CreateSymlink(legacy_config_dir, config_dir);
fs::create_directory_symlink(legacy_config_dir, config_dir);
}
if (fs::is_directory(legacy_cache_dir)) {
Common::FS::CreateSymlink(legacy_cache_dir, cache_dir);
fs::create_directory_symlink(legacy_cache_dir, cache_dir);
}
#endif

6
src/yuzu/migration_worker.h

@ -10,9 +10,15 @@
typedef struct Emulator {
const char *m_name;
<<<<<<< HEAD
Common::FS::EmuPath e_user_dir;
Common::FS::EmuPath e_config_dir;
Common::FS::EmuPath e_cache_dir;
=======
LegacyPath e_user_dir;
LegacyPath e_config_dir;
LegacyPath e_cache_dir;
>>>>>>> parent of 39f226a853 ([qt] Ryujinx save data link (#2815))
const std::string get_user_dir() const {
return Common::FS::GetLegacyPath(e_user_dir).string();

32
src/yuzu/ryujinx_dialog.h

@ -1,32 +0,0 @@
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
#ifndef RYUJINX_DIALOG_H
#define RYUJINX_DIALOG_H
#include <QDialog>
#include <filesystem>
namespace Ui {
class RyujinxDialog;
}
class RyujinxDialog : public QDialog
{
Q_OBJECT
public:
explicit RyujinxDialog(std::filesystem::path eden_path, std::filesystem::path ryu_path, QWidget *parent = nullptr);
~RyujinxDialog();
private slots:
void fromEden();
void fromRyujinx();
private:
Ui::RyujinxDialog *ui;
std::filesystem::path m_eden;
std::filesystem::path m_ryu;
};
#endif // RYUJINX_DIALOG_H

81
src/yuzu/ryujinx_dialog.ui

@ -1,81 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>RyujinxDialog</class>
<widget class="QDialog" name="RyujinxDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>404</width>
<height>170</height>
</rect>
</property>
<property name="windowTitle">
<string>Ryujinx Link</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="label">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Linking save data to Ryujinx lets both Ryujinx and Eden reference the same save files for your games.
By selecting &quot;From Eden&quot;, previous save data stored in Ryujinx will be deleted, and vice versa for &quot;From Ryujinx&quot;.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QPushButton" name="eden">
<property name="text">
<string>From Eden</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="ryujinx">
<property name="text">
<string>From Ryujinx</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="cancel">
<property name="text">
<string>Cancel</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<resources/>
<connections>
<connection>
<sender>cancel</sender>
<signal>clicked()</signal>
<receiver>RyujinxDialog</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>331</x>
<y>147</y>
</hint>
<hint type="destinationlabel">
<x>201</x>
<y>84</y>
</hint>
</hints>
</connection>
</connections>
</ui>
Loading…
Cancel
Save