From 3e6a74be131c1904c7bb543a4f5170a36cba684e Mon Sep 17 00:00:00 2001 From: "Herman S." <429230+has207@users.noreply.github.com> Date: Fri, 29 Aug 2025 00:18:50 +0900 Subject: [PATCH] Ensure runtime directories are created in storage_root() At the moment they end up wherever the command is run from on linux or exe directory on Windows, which ignores the "portable" install mechanism --- src/xenia/app/xenia_main.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/xenia/app/xenia_main.cc b/src/xenia/app/xenia_main.cc index b112cd22f..d6662e0b9 100644 --- a/src/xenia/app/xenia_main.cc +++ b/src/xenia/app/xenia_main.cc @@ -572,7 +572,7 @@ void EmulatorApp::EmulatorThread() { if (cvars::mount_scratch) { auto scratch_device = std::make_unique( - "\\SCRATCH", "scratch", false); + "\\SCRATCH", emulator_->storage_root() / "scratch", false); if (!scratch_device->Initialize()) { XELOGE("Unable to scan scratch path"); } else { @@ -585,8 +585,8 @@ void EmulatorApp::EmulatorThread() { } if (cvars::mount_cache) { - auto cache0_device = - std::make_unique("\\CACHE0", "cache0", false); + auto cache0_device = std::make_unique( + "\\CACHE0", emulator_->storage_root() / "cache0", false); if (!cache0_device->Initialize()) { XELOGE("Unable to scan cache0 path"); } else { @@ -597,8 +597,8 @@ void EmulatorApp::EmulatorThread() { } } - auto cache1_device = - std::make_unique("\\CACHE1", "cache1", false); + auto cache1_device = std::make_unique( + "\\CACHE1", emulator_->storage_root() / "cache1", false); if (!cache1_device->Initialize()) { XELOGE("Unable to scan cache1 path"); } else { @@ -613,8 +613,8 @@ void EmulatorApp::EmulatorThread() { // NOTE: this must be registered _after_ the cache0/cache1 devices, due to // substring/start_with logic inside VirtualFileSystem::ResolvePath, else // accesses to those devices will go here instead - auto cache_device = - std::make_unique("\\CACHE", "cache", false); + auto cache_device = std::make_unique( + "\\CACHE", emulator_->storage_root() / "cache", false); if (!cache_device->Initialize()) { XELOGE("Unable to scan cache path"); } else {