* Horizon: Implement arp:r and arp:w services * Fix formatting * Remove HLE arp services * Revert "Remove HLE arp services" This reverts commit c576fcccadb963db56b96bacabd1c1ac7abfb1ab. * Keep LibHac impl since it's used in bcat * Addresses gdkchan's feedback * ArpApi in PrepoIpcServer and remove LmApi * Fix 2 * Fixes ArpApi init * Fix encoding * Update PrepoService.cs * Fix prepo
40 lines
1.2 KiB
C#
40 lines
1.2 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 },
|
|
ModLoader.GetModsBasePath(),
|
|
ModLoader.GetSdModsBasePath());
|
|
|
|
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;
|
|
}
|
|
}
|
|
}
|