* Let’s start again * Read folders and such * Remove Open Mod Folder menu items * Fix folder opening, Selecting/deselecting * She works * Fix GTK * AddMod * Delete * Fix duplicate entries * Fix file check * Avalonia 11 * Style fixes * Final style fixes * Might be too general * Remove unnecessary using * Enable new mods by default * More cleanup * Fix saving metadata * Dont deseralise ModMetadata several times * Avalonia I hate you * Confirmation dialgoues * Allow selecting multiple folders * Add back secondary folder * Search both paths * Fix formatting * Apply suggestions from code review Co-authored-by: Ac_K <Acoustik666@gmail.com> * Rename Title to Application * Generic locale key * Apply suggestions from code review Co-authored-by: Ac_K <Acoustik666@gmail.com> * Locale Updates * GDK Feedback * Fix --------- Co-authored-by: Ac_K <Acoustik666@gmail.com>
38 lines
1.1 KiB
C#
38 lines
1.1 KiB
C#
using LibHac.Common;
|
|
using LibHac.FsSystem;
|
|
using LibHac.Loader;
|
|
using LibHac.Ncm;
|
|
using LibHac.Ns;
|
|
using Ryujinx.HLE.HOS;
|
|
using Ryujinx.HLE.Loaders.Processes.Extensions;
|
|
|
|
namespace Ryujinx.HLE.Loaders.Processes
|
|
{
|
|
static class LocalFileSystemExtensions
|
|
{
|
|
public static ProcessResult Load(this LocalFileSystem exeFs, Switch device, string romFsPath = "")
|
|
{
|
|
MetaLoader metaLoader = exeFs.GetNpdm();
|
|
var nacpData = new BlitStruct<ApplicationControlProperty>(1);
|
|
ulong programId = metaLoader.GetProgramId();
|
|
|
|
device.Configuration.VirtualFileSystem.ModLoader.CollectMods(new[] { programId });
|
|
|
|
if (programId != 0)
|
|
{
|
|
ProcessLoaderHelper.EnsureSaveData(device, new ApplicationId(programId), nacpData);
|
|
}
|
|
|
|
ProcessResult processResult = exeFs.Load(device, nacpData, metaLoader, 0);
|
|
|
|
// Load RomFS.
|
|
if (!string.IsNullOrEmpty(romFsPath))
|
|
{
|
|
device.Configuration.VirtualFileSystem.LoadRomFs(processResult.ProcessId, romFsPath);
|
|
}
|
|
|
|
return processResult;
|
|
}
|
|
}
|
|
}
|