From fc4b7cba2c083b3920f2d74e0cb4b08cf7a5a278 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Wed, 4 Jan 2023 20:01:44 -0300 Subject: Make PPTC state non-static (#4157) * Make PPTC state non-static * DiskCacheLoadState can be null --- Ryujinx.HLE/HOS/ArmProcessContext.cs | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'Ryujinx.HLE/HOS/ArmProcessContext.cs') diff --git a/Ryujinx.HLE/HOS/ArmProcessContext.cs b/Ryujinx.HLE/HOS/ArmProcessContext.cs index 072df0b6..6338edc1 100644 --- a/Ryujinx.HLE/HOS/ArmProcessContext.cs +++ b/Ryujinx.HLE/HOS/ArmProcessContext.cs @@ -6,7 +6,17 @@ using Ryujinx.Memory; namespace Ryujinx.HLE.HOS { - class ArmProcessContext : IProcessContext where T : class, IVirtualMemoryManagerTracked, IMemoryManager + interface IArmProcessContext : IProcessContext + { + IDiskCacheLoadState Initialize( + string titleIdText, + string displayVersion, + bool diskCacheEnabled, + ulong codeAddress, + ulong codeSize); + } + + class ArmProcessContext : IArmProcessContext where T : class, IVirtualMemoryManagerTracked, IMemoryManager { private readonly ulong _pid; private readonly GpuContext _gpuContext; @@ -40,6 +50,17 @@ namespace Ryujinx.HLE.HOS _cpuContext.Execute(context, codeAddress); } + public IDiskCacheLoadState Initialize( + string titleIdText, + string displayVersion, + bool diskCacheEnabled, + ulong codeAddress, + ulong codeSize) + { + _cpuContext.PrepareCodeRange(codeAddress, codeSize); + return _cpuContext.LoadDiskCache(titleIdText, displayVersion, diskCacheEnabled); + } + public void InvalidateCacheRegion(ulong address, ulong size) { _cpuContext.InvalidateCacheRegion(address, size); -- cgit v1.2.3