diff options
| author | crueter <swurl@swurl.xyz> | 2025-06-11 22:57:13 +0000 |
|---|---|---|
| committer | crueter <crueter@noreply.localhost> | 2025-06-11 22:57:13 +0000 |
| commit | c4ca8d2367e3283e2adcc37833376d68b2ece6fc (patch) | |
| tree | 88d9dc9a3a112ac4fb2ad2f6854515e9b7e97ebc /src/yuzu/main.cpp | |
| parent | 8ff1b9d282a9a7a8a02df86eecf19dbbd8440557 (diff) | |
Properly migrate internal NAND, Load, etc. directories (#167)
Signed-off-by: crueter <swurl@swurl.xyz>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/167
Co-authored-by: crueter <swurl@swurl.xyz>
Co-committed-by: crueter <swurl@swurl.xyz>
Diffstat (limited to 'src/yuzu/main.cpp')
| -rw-r--r-- | src/yuzu/main.cpp | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index b5db06ae9d..3dbe2e3243 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -1,7 +1,6 @@ // SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later -#include <cinttypes> #include <clocale> #include <cmath> #include <fstream> @@ -36,6 +35,7 @@ #include "configuration/configure_per_game.h" #include "configuration/configure_tas.h" #include "core/file_sys/romfs_factory.h" +#include "core/core_timing.h" #include "core/file_sys/vfs/vfs.h" #include "core/file_sys/vfs/vfs_real.h" #include "core/frontend/applets/cabinet.h" @@ -121,7 +121,6 @@ static FileSys::VirtualFile VfsDirectoryCreateFileWrapper(const FileSys::Virtual #endif #include "common/settings.h" #include "core/core.h" -#include "core/core_timing.h" #include "core/crypto/key_manager.h" #include "core/file_sys/card_image.h" #include "core/file_sys/common_funcs.h" @@ -149,7 +148,6 @@ static FileSys::VirtualFile VfsDirectoryCreateFileWrapper(const FileSys::Virtual #include "video_core/shader_notify.h" #include "yuzu/about_dialog.h" #include "yuzu/bootmanager.h" -#include "yuzu/compatdb.h" #include "yuzu/compatibility_list.h" #include "yuzu/configuration/configure_dialog.h" #include "yuzu/configuration/configure_input_per_game.h" @@ -319,6 +317,22 @@ GMainWindow::GMainWindow(bool has_broken_vulkan) Common::FS::CreateEdenPaths(); this->config = std::make_unique<QtConfig>(); + if (user_data_migrator.migrated) { + // Sort-of hack whereby we only move the old dir if it's a subfolder of the user dir + #define MIGRATE_DIR(type) std::string type##path = Common::FS::GetEdenPathString(Common::FS::EdenPath::type##Dir); \ + if (type##path.starts_with(user_data_migrator.selected_emu.get_user_dir())) { \ + boost::replace_all(type##path, user_data_migrator.selected_emu.lower_name(), "eden"); \ + Common::FS::SetEdenPath(Common::FS::EdenPath::type##Dir, type##path); \ + } + + MIGRATE_DIR(NAND) + MIGRATE_DIR(SDMC) + MIGRATE_DIR(Dump) + MIGRATE_DIR(Load) + + #undef MIGRATE_DIR + } + #ifdef __unix__ SetupSigInterrupts(); SetGamemodeEnabled(Settings::values.enable_gamemode.GetValue()); @@ -506,13 +520,14 @@ GMainWindow::GMainWindow(bool has_broken_vulkan) SetupPrepareForSleep(); + // Some moron added a race condition to the status bar + // so now we have to make this completely unnecessary call + // to prevent the UI from blowing up. + UpdateUITheme(); + QStringList args = QApplication::arguments(); if (args.size() < 2) { - // Some moron added a race condition to the status bar - // so now we have to make this completely unnecessary call - // to prevent the UI from blowing up. - UpdateUITheme(); return; } |
