mirror of
https://github.com/xenia-project/xenia.git
synced 2025-12-06 07:12:03 +01:00
[Kernel] Fixed TU loading on Linux
This commit is contained in:
parent
b7066c7a15
commit
40bd0080f1
|
|
@ -618,25 +618,25 @@ const object_ref<UserModule> KernelState::LoadTitleUpdate(
|
||||||
X_RESULT open_status = content_manager()->OpenContent(
|
X_RESULT open_status = content_manager()->OpenContent(
|
||||||
"UPDATE", 0, *title_update, content_license, disc_number);
|
"UPDATE", 0, *title_update, content_license, disc_number);
|
||||||
|
|
||||||
// Use the corresponding patch for the launch module
|
|
||||||
std::filesystem::path patch_xexp;
|
|
||||||
|
|
||||||
std::string mount_path = "";
|
std::string mount_path = "";
|
||||||
file_system()->FindSymbolicLink("game:", mount_path);
|
if (!file_system()->FindSymbolicLink("game:", mount_path)) {
|
||||||
|
|
||||||
auto is_relative = std::filesystem::relative(module->path(), mount_path);
|
|
||||||
|
|
||||||
if (is_relative.empty()) {
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
patch_xexp =
|
if (!module->path().starts_with(mount_path)) {
|
||||||
is_relative.replace_extension(is_relative.extension().string() + "p");
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
std::string resolved_path = "";
|
std::string resolved_path = "";
|
||||||
file_system()->FindSymbolicLink("UPDATE:", resolved_path);
|
if (!file_system()->FindSymbolicLink("UPDATE:", resolved_path)) {
|
||||||
xe::vfs::Entry* patch_entry = kernel_state()->file_system()->ResolvePath(
|
return nullptr;
|
||||||
resolved_path + patch_xexp.generic_string());
|
}
|
||||||
|
|
||||||
|
const std::string relative_path =
|
||||||
|
module->path().substr(mount_path.size() + 1) + 'p';
|
||||||
|
|
||||||
|
xe::vfs::Entry* patch_entry =
|
||||||
|
kernel_state()->file_system()->ResolvePath(resolved_path + relative_path);
|
||||||
|
|
||||||
if (!patch_entry) {
|
if (!patch_entry) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue