PPTC meets ExeFS Patching. (#1865)

* PPTC meets ExeFS Patching.

* InternalVersion = 1865

* Ready!

* Optimized the PtcProfiler Load/Save methods.
This commit is contained in:
LDj3SNuD 2021-05-13 20:05:15 +02:00 committed by GitHub
parent a8022ca3a1
commit 57ea3f93a3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 190 additions and 166 deletions

View file

@ -507,20 +507,18 @@ namespace Ryujinx.HLE.HOS
metaData = modLoadResult.Npdm;
}
bool hasPatches = _fileSystem.ModLoader.ApplyNsoPatches(TitleId, programs);
_fileSystem.ModLoader.ApplyNsoPatches(TitleId, programs);
_contentManager.LoadEntries(_device);
bool usePtc = _device.System.EnablePtc;
// don't use PTC if exefs files have been replaced
// Don't use PPTC if ExeFs files have been replaced.
usePtc &= !modLoadResult.Modified;
// don't use PTC if exefs files have been patched
usePtc &= !hasPatches;
if (_device.System.EnablePtc && !usePtc)
{
Logger.Warning?.Print(LogClass.Ptc, $"Detected exefs modifications. PPTC disabled.");
Logger.Warning?.Print(LogClass.Ptc, $"Detected unsupported ExeFs modifications. PPTC disabled.");
}
Graphics.Gpu.GraphicsConfig.TitleId = TitleIdText;