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
+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;