Fix cheat support

Co-authored-by: KeatonTheBot <keaton@ryujinx.app>
This commit is contained in:
BeZide93
2026-02-17 18:38:35 -06:00
committed by KeatonTheBot
co-authored by KeatonTheBot
parent 59b1989b97
commit ad0e2c0dea
3 changed files with 38 additions and 10 deletions
+22 -2
View File
@@ -24,7 +24,7 @@
<Type Name="Silk.NET.Vulkan.Extensions.KHR.KhrSwapchain"
Dynamic="Required All"/>
</Assembly>
<Assembly Name="Ryujinx.HLE">
<Assembly Name="Ryujinx.HLE" Dynamic="Required All">
<Type Name="Ryujinx.HLE.HOS.Services.Nv.NvDrvServices.NvHostChannel.NvHostGpuDeviceFile"
Dynamic="Required All" />
<Type Name="Ryujinx.HLE.HOS.Services.Fs.IFileSystemProxyForLoader"
@@ -531,6 +531,26 @@
Dynamic="Required All" />
<Type Name="Ryujinx.HLE.HOS.Services.Pcv.Rgltr.IRegulatorManager"
Dynamic="Required All" />
<!-- Explicitly root the generic tamper operations that are built via MakeGenericType -->
<Type Name="Ryujinx.HLE.HOS.Tamper.Operations.OpMov`1[[System.Byte]]"
Dynamic="Required All" />
<Type Name="Ryujinx.HLE.HOS.Tamper.Operations.OpMov`1[[System.UInt16]]"
Dynamic="Required All" />
<Type Name="Ryujinx.HLE.HOS.Tamper.Operations.OpMov`1[[System.UInt32]]"
Dynamic="Required All" />
<Type Name="Ryujinx.HLE.HOS.Tamper.Operations.OpMov`1[[System.UInt64]]"
Dynamic="Required All" />
<Type Name="Ryujinx.HLE.HOS.Tamper.Operations.OpAdd`1[[System.Byte]]"
Dynamic="Required All" />
<Type Name="Ryujinx.HLE.HOS.Tamper.Operations.OpAdd`1[[System.UInt16]]"
Dynamic="Required All" />
<Type Name="Ryujinx.HLE.HOS.Tamper.Operations.OpAdd`1[[System.UInt32]]"
Dynamic="Required All" />
<Type Name="Ryujinx.HLE.HOS.Tamper.Operations.OpAdd`1[[System.UInt64]]"
Dynamic="Required All" />
</Assembly>
<!-- AOT/Trimming: Keep dynamic binder & expression tree runtime -->
<Assembly Name="Microsoft.CSharp" Dynamic="Required All" />
<Assembly Name="System.Linq.Expressions" Dynamic="Required All" />
</Application>
</Directives>
</Directives>
+15 -5
View File
@@ -50,6 +50,9 @@ namespace Ryujinx.HLE.HOS
_programs.Enqueue(program);
_programDictionary.TryAdd($"{buildId}-{name}", program);
// Enable by default (Android does not (yet) have a UI that calls EnableCheats)
program.IsEnabled = true;
}
Activate();
@@ -138,7 +141,11 @@ namespace Ryujinx.HLE.HOS
// Re-enqueue the tampering program because the process is still valid.
_programs.Enqueue(program);
// If the cheat is (still) disabled just keep rotating, don't execute it.
if (!program.IsEnabled)
{
return true;
}
Logger.Debug?.Print(LogClass.TamperMachine, $"Running tampering program {program.Name}");
try
@@ -159,10 +166,13 @@ namespace Ryujinx.HLE.HOS
{
Logger.Debug?.Print(LogClass.TamperMachine, $"The tampering program {program.Name} crashed, this can happen while the game is starting");
if (!string.IsNullOrEmpty(ex.Message))
{
Logger.Debug?.Print(LogClass.TamperMachine, ex.Message);
}
//if (!string.IsNullOrEmpty(ex.Message))
//{
// Logger.Debug?.Print(LogClass.TamperMachine, ex.Message);
//}
// Complete stack trace
Logger.Debug?.Print(LogClass.TamperMachine, ex.ToString());
}
return true;
+1 -3
View File
@@ -1,7 +1,5 @@
<linker>
<assembly fullname="Ryujinx.HLE">
<type fullname="Ryujinx.HLE.HOS.Services*" preserve="all"/>
</assembly>
<assembly fullname="Ryujinx.HLE" preserve="all"/>
<assembly fullname="System.Management">
<type fullname="System.Management.MTAHelper*" preserve="all"/>
<type fullname="System.Management.WmiNetUtilsHelper*" preserve="all"/>