From 560ed5eebda0c8e54c3c029a9bf54000e52a2933 Mon Sep 17 00:00:00 2001 From: Logan Stromberg Date: Mon, 29 Nov 2021 10:21:27 -0800 Subject: Don't blow up everything if a DLC file is moved or renamed. (#2867) * Don't blow up everything if a DLC file is missing * change comment * More correctly setting the "enabled" check box on dlc dialog for the add-on NSP based on the enabled state of all NCAs in the package. * Update Ryujinx.HLE/HOS/ApplicationLoader.cs Co-authored-by: Ac_K Co-authored-by: Logan Stromberg Co-authored-by: Ac_K --- Ryujinx.HLE/HOS/ApplicationLoader.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Ryujinx.HLE/HOS') diff --git a/Ryujinx.HLE/HOS/ApplicationLoader.cs b/Ryujinx.HLE/HOS/ApplicationLoader.cs index f794d199..767496d2 100644 --- a/Ryujinx.HLE/HOS/ApplicationLoader.cs +++ b/Ryujinx.HLE/HOS/ApplicationLoader.cs @@ -335,7 +335,14 @@ namespace Ryujinx.HLE.HOS { foreach (DlcNca dlcNca in dlcContainer.DlcNcaList) { - _device.Configuration.ContentManager.AddAocItem(dlcNca.TitleId, dlcContainer.Path, dlcNca.Path, dlcNca.Enabled); + if (File.Exists(dlcContainer.Path)) + { + _device.Configuration.ContentManager.AddAocItem(dlcNca.TitleId, dlcContainer.Path, dlcNca.Path, dlcNca.Enabled); + } + else + { + Logger.Warning?.Print(LogClass.Application, $"Cannot find AddOnContent file {dlcContainer.Path}. It may have been moved or renamed."); + } } } } -- cgit v1.2.3