1
0
Fork 0
mirror of https://github.com/Ryujinx/Ryujinx.git synced 2024-11-17 17:46:40 +00:00

fix:HLE/ModLoader: Cheat loading crashes if directory doesn't exist

This commit is contained in:
Barış Hamil 2024-08-04 12:46:04 +03:00
parent 263eb97f79
commit 387d9e20f4

View file

@ -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))