From 2344a6f10d4703fb716e3f4b29f5c638e77be546 Mon Sep 17 00:00:00 2001 From: "Skyth (Asilkan)" <19259897+blueskythlikesclouds@users.noreply.github.com> Date: Mon, 24 Mar 2025 22:23:09 +0300 Subject: [PATCH] Implement hacky fix for some update files not loading. (#1327) --- UnleashedRecomp/kernel/io/file_system.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/UnleashedRecomp/kernel/io/file_system.cpp b/UnleashedRecomp/kernel/io/file_system.cpp index 8193364f..a765d12a 100644 --- a/UnleashedRecomp/kernel/io/file_system.cpp +++ b/UnleashedRecomp/kernel/io/file_system.cpp @@ -383,7 +383,17 @@ std::filesystem::path FileSystem::ResolvePath(const std::string_view& path, bool if (index != std::string::npos) { // rooted folder, handle direction - const std::string_view root = path.substr(0, index); + std::string_view root = path.substr(0, index); + + // HACK: The game tries to load work folder from the "game" root path for + // Application and shader archives, which does not work in Recomp because + // we don't support stacking the update and game files on top of each other. + // + // We can fix it by redirecting it to update instead as we know the original + // game files don't have a work folder. + if (path.starts_with("game:\\work\\")) + root = "update"; + const auto newRoot = XamGetRootPath(root); if (!newRoot.empty())