From f43442f774a4af8d1b41cae6dd93793f8f3f2069 Mon Sep 17 00:00:00 2001 From: WilliamWsyHK Date: Wed, 1 Jan 2025 16:15:14 +0800 Subject: [PATCH] Include Hack for XC2 JP Edition (#481) XC2 has 2 editions, one JP and one global. I own the JP version and suffered from the soft-lock, meanwhile the current hack only works for global edition, so PR is simply include JP edition from the hack. --- .../HOS/Services/Fs/FileSystemProxy/IStorage.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Ryujinx.HLE/HOS/Services/Fs/FileSystemProxy/IStorage.cs b/src/Ryujinx.HLE/HOS/Services/Fs/FileSystemProxy/IStorage.cs index 3d197ac19..ad4cccc44 100644 --- a/src/Ryujinx.HLE/HOS/Services/Fs/FileSystemProxy/IStorage.cs +++ b/src/Ryujinx.HLE/HOS/Services/Fs/FileSystemProxy/IStorage.cs @@ -15,8 +15,10 @@ namespace Ryujinx.HLE.HOS.Services.Fs.FileSystemProxy { _baseStorage = SharedRef.CreateMove(ref baseStorage); } - - private const string Xc2TitleId = "0100e95004038000"; + + private const string Xc2JpTitleId = "0100f3400332c000"; + private const string Xc2GlobalTitleId = "0100e95004038000"; + private static bool IsXc2 => TitleIDs.CurrentApplication.Value.OrDefault() is Xc2GlobalTitleId or Xc2JpTitleId; [CommandCmif(0)] // Read(u64 offset, u64 length) -> buffer buffer @@ -39,7 +41,7 @@ namespace Ryujinx.HLE.HOS.Services.Fs.FileSystemProxy using var region = context.Memory.GetWritableRegion(bufferAddress, (int)bufferLen, true); Result result = _baseStorage.Get.Read((long)offset, new OutBuffer(region.Memory.Span), (long)size); - if (context.Device.DirtyHacks.IsEnabled(DirtyHack.Xc2MenuSoftlockFix) && TitleIDs.CurrentApplication.Value == Xc2TitleId) + if (context.Device.DirtyHacks.IsEnabled(DirtyHack.Xc2MenuSoftlockFix) && IsXc2) { // Add a load-bearing sleep to avoid XC2 softlock // https://web.archive.org/web/20240728045136/https://github.com/Ryujinx/Ryujinx/issues/2357