mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-12-23 10:01:21 -08:00
fix:HLE/ModLoader: Cheat loading crashes if directory doesn't exist
This commit is contained in:
parent
263eb97f79
commit
387d9e20f4
@ -741,6 +741,11 @@ namespace Ryujinx.HLE.HOS
|
|||||||
internal static void EnableCheats(ulong applicationId, TamperMachine tamperMachine)
|
internal static void EnableCheats(ulong applicationId, TamperMachine tamperMachine)
|
||||||
{
|
{
|
||||||
var contentDirectory = FindApplicationDir(new DirectoryInfo(Path.Combine(GetModsBasePath(), AmsContentsDir)), $"{applicationId:x16}");
|
var contentDirectory = FindApplicationDir(new DirectoryInfo(Path.Combine(GetModsBasePath(), AmsContentsDir)), $"{applicationId:x16}");
|
||||||
|
if (contentDirectory == null)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
string enabledCheatsPath = Path.Combine(contentDirectory.FullName, CheatDir, "enabled.txt");
|
string enabledCheatsPath = Path.Combine(contentDirectory.FullName, CheatDir, "enabled.txt");
|
||||||
|
|
||||||
if (File.Exists(enabledCheatsPath))
|
if (File.Exists(enabledCheatsPath))
|
||||||
|
Loading…
Reference in New Issue
Block a user