mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2025-06-29 23:00:47 -07:00
Add Cheat Manager (#2964)
* add cheatmanager * use modloader to load cheats for manager * addressed nits
This commit is contained in:
@ -664,7 +664,20 @@ namespace Ryujinx.HLE.HOS
|
||||
|
||||
Logger.Info?.Print(LogClass.ModLoader, $"Installing cheat '{cheat.Name}'");
|
||||
|
||||
tamperMachine.InstallAtmosphereCheat(cheat.Name, cheat.Instructions, tamperInfo, exeAddress);
|
||||
tamperMachine.InstallAtmosphereCheat(cheat.Name, cheatId, cheat.Instructions, tamperInfo, exeAddress);
|
||||
}
|
||||
|
||||
EnableCheats(titleId, tamperMachine);
|
||||
}
|
||||
|
||||
internal void EnableCheats(ulong titleId, TamperMachine tamperMachine)
|
||||
{
|
||||
var contentDirectory = FindTitleDir(new DirectoryInfo(Path.Combine(GetModsBasePath(), AmsContentsDir)), $"{titleId:x16}");
|
||||
string enabledCheatsPath = Path.Combine(contentDirectory.FullName, CheatDir, "enabled.txt");
|
||||
|
||||
if (File.Exists(enabledCheatsPath))
|
||||
{
|
||||
tamperMachine.EnableCheats(File.ReadAllLines(enabledCheatsPath));
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user