fix:HLE/ModLoader: Cheat loading crashes if directory doesn't exist
This commit is contained in:
parent
263eb97f79
commit
387d9e20f4
1 changed files with 5 additions and 0 deletions
|
@ -741,6 +741,11 @@ namespace Ryujinx.HLE.HOS
|
|||
internal static void EnableCheats(ulong applicationId, TamperMachine tamperMachine)
|
||||
{
|
||||
var contentDirectory = FindApplicationDir(new DirectoryInfo(Path.Combine(GetModsBasePath(), AmsContentsDir)), $"{applicationId:x16}");
|
||||
if (contentDirectory == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
string enabledCheatsPath = Path.Combine(contentDirectory.FullName, CheatDir, "enabled.txt");
|
||||
|
||||
if (File.Exists(enabledCheatsPath))
|
||||
|
|
Loading…
Reference in a new issue