aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/HOS/Services/Fs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.HLE/HOS/Services/Fs')
-rw-r--r--Ryujinx.HLE/HOS/Services/Fs/IFileSystemProxy.cs17
1 files changed, 13 insertions, 4 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Fs/IFileSystemProxy.cs b/Ryujinx.HLE/HOS/Services/Fs/IFileSystemProxy.cs
index 35cf160f..6c843b27 100644
--- a/Ryujinx.HLE/HOS/Services/Fs/IFileSystemProxy.cs
+++ b/Ryujinx.HLE/HOS/Services/Fs/IFileSystemProxy.cs
@@ -372,17 +372,26 @@ namespace Ryujinx.HLE.HOS.Services.Fs
byte[] padding = context.RequestData.ReadBytes(7);
long titleId = context.RequestData.ReadInt64();
+ // We do a mitm here to find if the request is for an AOC.
+ // This is because AOC can be distributed over multiple containers in the emulator.
+ if (context.Device.System.ContentManager.GetAocDataStorage((ulong)titleId, out LibHac.Fs.IStorage aocStorage))
+ {
+ Logger.PrintInfo(LogClass.Loader, $"Opened AddOnContent Data TitleID={titleId:X16}");
+
+ MakeObject(context, new FileSystemProxy.IStorage(aocStorage));
+
+ return ResultCode.Success;
+ }
+
NcaContentType contentType = NcaContentType.Data;
- StorageId installedStorage =
- context.Device.System.ContentManager.GetInstalledStorage(titleId, contentType, storageId);
+ StorageId installedStorage = context.Device.System.ContentManager.GetInstalledStorage(titleId, contentType, storageId);
if (installedStorage == StorageId.None)
{
contentType = NcaContentType.PublicData;
- installedStorage =
- context.Device.System.ContentManager.GetInstalledStorage(titleId, contentType, storageId);
+ installedStorage = context.Device.System.ContentManager.GetInstalledStorage(titleId, contentType, storageId);
}
if (installedStorage != StorageId.None)