Add Cheat Manager (#2964)
* add cheatmanager * use modloader to load cheats for manager * addressed nits
This commit is contained in:
parent
dc8a1d5cba
commit
e98abf1820
12 changed files with 388 additions and 13 deletions
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue