diff --git a/bin/x64/Debug/config/NxEmu.config b/bin/x64/Debug/user/config/NxEmu.config similarity index 100% rename from bin/x64/Debug/config/NxEmu.config rename to bin/x64/Debug/user/config/NxEmu.config diff --git a/bin/x64/Release/config/NxEmu.config b/bin/x64/Release/user/config/NxEmu.config similarity index 100% rename from bin/x64/Release/config/NxEmu.config rename to bin/x64/Release/user/config/NxEmu.config diff --git a/src/nxemu-core/app_init.cpp b/src/nxemu-core/app_init.cpp index b4140c22..358be751 100644 --- a/src/nxemu-core/app_init.cpp +++ b/src/nxemu-core/app_init.cpp @@ -23,7 +23,7 @@ bool AppInit(INotification * notification, const char * baseDirectory, const cha return false; } - Path config_path(app_base, "NxEmu.config"); + Path config_path(appDirectory, "NxEmu.config"); config_path.AppendDirectory("config"); g_notify = notification; diff --git a/src/nxemu/main.cpp b/src/nxemu/main.cpp index 812c9398..fc1e7108 100644 --- a/src/nxemu/main.cpp +++ b/src/nxemu/main.cpp @@ -81,7 +81,7 @@ static void EnablePerMonitorDpiAwareness() int WINAPI WinMain(_In_ HINSTANCE /*hInstance*/, _In_opt_ HINSTANCE /*hPrevInstance*/, _In_ LPSTR /*lpszArgs*/, _In_ int /*nWinMode*/) { EnablePerMonitorDpiAwareness(); - bool res = AppInit(&Notification::GetInstance(), Path(Path::MODULE_DIRECTORY), Common::FS::PathToUTF8String(Common::FS::GetDefaultAppStorageDirectory()).c_str()); + bool res = AppInit(&Notification::GetInstance(), Path(Path::MODULE_DIRECTORY), Common::FS::GetYuzuPathString(Common::FS::YuzuPath::YuzuDir).c_str()); if (uiSettings.performVulkanCheck) { diff --git a/src/yuzu_common/fs/path_util.cpp b/src/yuzu_common/fs/path_util.cpp index 877dedd4..1ebfb6e6 100644 --- a/src/yuzu_common/fs/path_util.cpp +++ b/src/yuzu_common/fs/path_util.cpp @@ -55,27 +55,6 @@ namespace Common::FS { namespace fs = std::filesystem; -fs::path GetDefaultAppStorageDirectory() -{ -#ifdef _WIN32 - fs::path yuzu_path = GetExeDirectory() / PORTABLE_DIR; - if (!IsDir(yuzu_path)) - { - yuzu_path = GetAppDataRoamingDirectory() / NXEMU_DIR; - } - return yuzu_path; -#elif defined(ANDROID) - return {}; -#else - fs::path yuzu_path = GetCurrentDir() / PORTABLE_DIR; - if (Exists(yuzu_path) && IsDir(yuzu_path)) - { - return yuzu_path; - } - return GetDataDirectory("XDG_DATA_HOME") / NXEMU_DIR; -#endif -} - /** * The PathManagerImpl is a singleton allowing to manage the mapping of * YuzuPath enums to real filesystem paths. diff --git a/src/yuzu_common/fs/path_util.h b/src/yuzu_common/fs/path_util.h index 7138d302..3efaed42 100644 --- a/src/yuzu_common/fs/path_util.h +++ b/src/yuzu_common/fs/path_util.h @@ -183,14 +183,6 @@ template } #endif -/** - * Resolves the default yuzu/nxemu user data root (portable {@code user/} next to the executable, - * or {@code %AppData%/nxemu} on Windows, or XDG paths on Linux). - * - * On Android this returns an empty path; the frontend must supply a directory via SetAppDirectory. - */ -[[nodiscard]] std::filesystem::path GetDefaultAppStorageDirectory(); - /** * Sets the directory used for application storage. Used on Android where we do not know internal * storage until informed by the frontend.