infra: Update to Ryujinx.LibHac 0.20.0.

This time it's pulled in via GitLab package registry.
This commit is contained in:
GreemDev 2025-05-18 02:26:39 -05:00 committed by KeatonTheBot
parent 6c7b7d6fc4
commit 2a03f7b1d4
19 changed files with 126 additions and 91 deletions

View file

@ -39,7 +39,7 @@
<PackageVersion Include="Ryujinx.Graphics.Nvdec.Dependencies.Windows" Version="6.1.2-build4" /> <PackageVersion Include="Ryujinx.Graphics.Nvdec.Dependencies.Windows" Version="6.1.2-build4" />
<PackageVersion Include="Ryujinx.Graphics.Vulkan.Dependencies.MoltenVK" Version="1.2.0" /> <PackageVersion Include="Ryujinx.Graphics.Vulkan.Dependencies.MoltenVK" Version="1.2.0" />
<PackageVersion Include="Ryujinx.GtkSharp" Version="3.24.24.59-ryujinx" /> <PackageVersion Include="Ryujinx.GtkSharp" Version="3.24.24.59-ryujinx" />
<PackageVersion Include="Ryujinx.LibHac" Version="0.19.0" /> <PackageVersion Include="Ryujinx.LibHac" Version="0.20.0-alpha.103" />
<PackageVersion Include="Ryujinx.SDL2-CS" Version="2.30.0-build32" /> <PackageVersion Include="Ryujinx.SDL2-CS" Version="2.30.0-build32" />
<PackageVersion Include="securifybv.ShellLink" Version="0.1.0" /> <PackageVersion Include="securifybv.ShellLink" Version="0.1.0" />
<PackageVersion Include="shaderc.net" Version="0.1.0" /> <PackageVersion Include="shaderc.net" Version="0.1.0" />

View file

@ -1,7 +1,21 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<configuration> <configuration>
<packageSources> <packageSources>
<clear /> <clear />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" /> <add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
</packageSources> <add key="LibHacAlpha" value="https://git.ryujinx.app/api/v4/projects/17/packages/nuget/index.json" />
</packageSources>
<!-- Define mappings by adding package patterns beneath the target source. -->
<!-- Ryujinx.LibHac packages will be restored from LibHacAlpha,
everything else from nuget.org. -->
<packageSourceMapping>
<!-- key value for <packageSource> should match key values from <packageSources> element -->
<packageSource key="nuget.org">
<package pattern="*" />
</packageSource>
<packageSource key="LibHacAlpha">
<package pattern="Ryujinx.LibHac" />
</packageSource>
</packageSourceMapping>
</configuration> </configuration>

View file

@ -9,7 +9,7 @@ namespace Ryujinx.HLE.FileSystem
public class EncryptedFileSystemCreator : IEncryptedFileSystemCreator public class EncryptedFileSystemCreator : IEncryptedFileSystemCreator
{ {
public Result Create(ref SharedRef<IFileSystem> outEncryptedFileSystem, public Result Create(ref SharedRef<IFileSystem> outEncryptedFileSystem,
ref SharedRef<IFileSystem> baseFileSystem, IEncryptedFileSystemCreator.KeyId idIndex, ref readonly SharedRef<IFileSystem> baseFileSystem, IEncryptedFileSystemCreator.KeyId idIndex,
in EncryptionSeed encryptionSeed) in EncryptionSeed encryptionSeed)
{ {
if (idIndex < IEncryptedFileSystemCreator.KeyId.Save || idIndex > IEncryptedFileSystemCreator.KeyId.CustomStorage) if (idIndex < IEncryptedFileSystemCreator.KeyId.Save || idIndex > IEncryptedFileSystemCreator.KeyId.CustomStorage)
@ -18,7 +18,7 @@ namespace Ryujinx.HLE.FileSystem
} }
// TODO: Reenable when AesXtsFileSystem is fixed. // TODO: Reenable when AesXtsFileSystem is fixed.
outEncryptedFileSystem = SharedRef<IFileSystem>.CreateMove(ref baseFileSystem); outEncryptedFileSystem = SharedRef<IFileSystem>.CreateMove(ref baseFileSystem.Ref);
return Result.Success; return Result.Success;
} }

View file

@ -798,7 +798,7 @@ namespace Ryujinx.HLE.HOS
{ {
var buildId = p switch var buildId = p switch
{ {
NsoExecutable nso => Convert.ToHexString(nso.BuildId.ItemsRo.ToArray()).TrimEnd('0'), NsoExecutable nso => Convert.ToHexString(nso.BuildId).TrimEnd('0'),
NroExecutable nro => Convert.ToHexString(nro.Header.BuildId).TrimEnd('0'), NroExecutable nro => Convert.ToHexString(nro.Header.BuildId).TrimEnd('0'),
_ => string.Empty, _ => string.Empty,
}; };

View file

@ -3,6 +3,7 @@ using LibHac.Common;
using LibHac.Fs; using LibHac.Fs;
using LibHac.Fs.Shim; using LibHac.Fs.Shim;
using LibHac.FsSrv.Impl; using LibHac.FsSrv.Impl;
using LibHac.FsSrv.Sf;
using LibHac.FsSystem; using LibHac.FsSystem;
using LibHac.Ncm; using LibHac.Ncm;
using LibHac.Sf; using LibHac.Sf;
@ -12,10 +13,12 @@ using LibHac.Tools.FsSystem.NcaUtils;
using Ryujinx.Common; using Ryujinx.Common;
using Ryujinx.Common.Logging; using Ryujinx.Common.Logging;
using Ryujinx.HLE.HOS.Services.Fs.FileSystemProxy; using Ryujinx.HLE.HOS.Services.Fs.FileSystemProxy;
using Ryujinx.Memory;
using System; using System;
using System.IO; using System.IO;
using static Ryujinx.HLE.Utilities.StringUtils; using static Ryujinx.HLE.Utilities.StringUtils;
using GameCardHandle = System.UInt32; using GameCardHandle = System.UInt32;
using IFile = Ryujinx.HLE.HOS.Services.Fs.FileSystemProxy.IFile;
using IFileSystem = LibHac.FsSrv.Sf.IFileSystem; using IFileSystem = LibHac.FsSrv.Sf.IFileSystem;
using IStorage = LibHac.FsSrv.Sf.IStorage; using IStorage = LibHac.FsSrv.Sf.IStorage;
@ -29,7 +32,7 @@ namespace Ryujinx.HLE.HOS.Services.Fs
public IFileSystemProxy(ServiceCtx context) : base(context.Device.System.FsServer) public IFileSystemProxy(ServiceCtx context) : base(context.Device.System.FsServer)
{ {
var applicationClient = context.Device.System.LibHacHorizonManager.ApplicationClient; HorizonClient applicationClient = context.Device.System.LibHacHorizonManager.ApplicationClient;
_baseFileSystemProxy = applicationClient.Fs.Impl.GetFileSystemProxyServiceObject(); _baseFileSystemProxy = applicationClient.Fs.Impl.GetFileSystemProxyServiceObject();
} }
@ -106,8 +109,8 @@ namespace Ryujinx.HLE.HOS.Services.Fs
{ {
BisPartitionId bisPartitionId = (BisPartitionId)context.RequestData.ReadInt32(); BisPartitionId bisPartitionId = (BisPartitionId)context.RequestData.ReadInt32();
ref readonly var path = ref FileSystemProxyHelper.GetFspPath(context); ref readonly FspPath path = ref FileSystemProxyHelper.GetFspPath(context);
using var fileSystem = new SharedRef<IFileSystem>(); using SharedRef<IFileSystem> fileSystem = new();
Result result = _baseFileSystemProxy.Get.OpenBisFileSystem(ref fileSystem.Ref, in path, bisPartitionId); Result result = _baseFileSystemProxy.Get.OpenBisFileSystem(ref fileSystem.Ref, in path, bisPartitionId);
if (result.IsFailure()) if (result.IsFailure())
@ -125,7 +128,7 @@ namespace Ryujinx.HLE.HOS.Services.Fs
public ResultCode OpenBisStorage(ServiceCtx context) public ResultCode OpenBisStorage(ServiceCtx context)
{ {
BisPartitionId bisPartitionId = (BisPartitionId)context.RequestData.ReadInt32(); BisPartitionId bisPartitionId = (BisPartitionId)context.RequestData.ReadInt32();
using var storage = new SharedRef<IStorage>(); using SharedRef<IStorage> storage = new();
Result result = _baseFileSystemProxy.Get.OpenBisStorage(ref storage.Ref, bisPartitionId); Result result = _baseFileSystemProxy.Get.OpenBisStorage(ref storage.Ref, bisPartitionId);
if (result.IsFailure()) if (result.IsFailure())
@ -149,7 +152,7 @@ namespace Ryujinx.HLE.HOS.Services.Fs
// OpenSdCardFileSystem() -> object<nn::fssrv::sf::IFileSystem> // OpenSdCardFileSystem() -> object<nn::fssrv::sf::IFileSystem>
public ResultCode OpenSdCardFileSystem(ServiceCtx context) public ResultCode OpenSdCardFileSystem(ServiceCtx context)
{ {
using var fileSystem = new SharedRef<IFileSystem>(); using SharedRef<IFileSystem> fileSystem = new();
Result result = _baseFileSystemProxy.Get.OpenSdCardFileSystem(ref fileSystem.Ref); Result result = _baseFileSystemProxy.Get.OpenSdCardFileSystem(ref fileSystem.Ref);
if (result.IsFailure()) if (result.IsFailure())
@ -257,7 +260,7 @@ namespace Ryujinx.HLE.HOS.Services.Fs
{ {
GameCardHandle handle = context.RequestData.ReadUInt32(); GameCardHandle handle = context.RequestData.ReadUInt32();
GameCardPartitionRaw partitionId = (GameCardPartitionRaw)context.RequestData.ReadInt32(); GameCardPartitionRaw partitionId = (GameCardPartitionRaw)context.RequestData.ReadInt32();
using var storage = new SharedRef<IStorage>(); using SharedRef<IStorage> storage = new();
Result result = _baseFileSystemProxy.Get.OpenGameCardStorage(ref storage.Ref, handle, partitionId); Result result = _baseFileSystemProxy.Get.OpenGameCardStorage(ref storage.Ref, handle, partitionId);
if (result.IsFailure()) if (result.IsFailure())
@ -276,7 +279,7 @@ namespace Ryujinx.HLE.HOS.Services.Fs
{ {
GameCardHandle handle = context.RequestData.ReadUInt32(); GameCardHandle handle = context.RequestData.ReadUInt32();
GameCardPartition partitionId = (GameCardPartition)context.RequestData.ReadInt32(); GameCardPartition partitionId = (GameCardPartition)context.RequestData.ReadInt32();
using var fileSystem = new SharedRef<IFileSystem>(); using SharedRef<IFileSystem> fileSystem = new();
Result result = _baseFileSystemProxy.Get.OpenGameCardFileSystem(ref fileSystem.Ref, handle, partitionId); Result result = _baseFileSystemProxy.Get.OpenGameCardFileSystem(ref fileSystem.Ref, handle, partitionId);
if (result.IsFailure()) if (result.IsFailure())
@ -357,7 +360,7 @@ namespace Ryujinx.HLE.HOS.Services.Fs
{ {
SaveDataSpaceId spaceId = (SaveDataSpaceId)context.RequestData.ReadInt64(); SaveDataSpaceId spaceId = (SaveDataSpaceId)context.RequestData.ReadInt64();
SaveDataAttribute attribute = context.RequestData.ReadStruct<SaveDataAttribute>(); SaveDataAttribute attribute = context.RequestData.ReadStruct<SaveDataAttribute>();
using var fileSystem = new SharedRef<IFileSystem>(); using SharedRef<IFileSystem> fileSystem = new();
Result result = _baseFileSystemProxy.Get.OpenSaveDataFileSystem(ref fileSystem.Ref, spaceId, in attribute); Result result = _baseFileSystemProxy.Get.OpenSaveDataFileSystem(ref fileSystem.Ref, spaceId, in attribute);
if (result.IsFailure()) if (result.IsFailure())
@ -376,7 +379,7 @@ namespace Ryujinx.HLE.HOS.Services.Fs
{ {
SaveDataSpaceId spaceId = (SaveDataSpaceId)context.RequestData.ReadInt64(); SaveDataSpaceId spaceId = (SaveDataSpaceId)context.RequestData.ReadInt64();
SaveDataAttribute attribute = context.RequestData.ReadStruct<SaveDataAttribute>(); SaveDataAttribute attribute = context.RequestData.ReadStruct<SaveDataAttribute>();
using var fileSystem = new SharedRef<IFileSystem>(); using SharedRef<IFileSystem> fileSystem = new();
Result result = _baseFileSystemProxy.Get.OpenSaveDataFileSystemBySystemSaveDataId(ref fileSystem.Ref, spaceId, in attribute); Result result = _baseFileSystemProxy.Get.OpenSaveDataFileSystemBySystemSaveDataId(ref fileSystem.Ref, spaceId, in attribute);
if (result.IsFailure()) if (result.IsFailure())
@ -395,7 +398,7 @@ namespace Ryujinx.HLE.HOS.Services.Fs
{ {
SaveDataSpaceId spaceId = (SaveDataSpaceId)context.RequestData.ReadInt64(); SaveDataSpaceId spaceId = (SaveDataSpaceId)context.RequestData.ReadInt64();
SaveDataAttribute attribute = context.RequestData.ReadStruct<SaveDataAttribute>(); SaveDataAttribute attribute = context.RequestData.ReadStruct<SaveDataAttribute>();
using var fileSystem = new SharedRef<IFileSystem>(); using SharedRef<IFileSystem> fileSystem = new();
Result result = _baseFileSystemProxy.Get.OpenReadOnlySaveDataFileSystem(ref fileSystem.Ref, spaceId, in attribute); Result result = _baseFileSystemProxy.Get.OpenReadOnlySaveDataFileSystem(ref fileSystem.Ref, spaceId, in attribute);
if (result.IsFailure()) if (result.IsFailure())
@ -466,7 +469,7 @@ namespace Ryujinx.HLE.HOS.Services.Fs
// OpenSaveDataInfoReader() -> object<nn::fssrv::sf::ISaveDataInfoReader> // OpenSaveDataInfoReader() -> object<nn::fssrv::sf::ISaveDataInfoReader>
public ResultCode OpenSaveDataInfoReader(ServiceCtx context) public ResultCode OpenSaveDataInfoReader(ServiceCtx context)
{ {
using var infoReader = new SharedRef<LibHac.FsSrv.Sf.ISaveDataInfoReader>(); using SharedRef<LibHac.FsSrv.Sf.ISaveDataInfoReader> infoReader = new();
Result result = _baseFileSystemProxy.Get.OpenSaveDataInfoReader(ref infoReader.Ref); Result result = _baseFileSystemProxy.Get.OpenSaveDataInfoReader(ref infoReader.Ref);
if (result.IsFailure()) if (result.IsFailure())
@ -484,7 +487,7 @@ namespace Ryujinx.HLE.HOS.Services.Fs
public ResultCode OpenSaveDataInfoReaderBySaveDataSpaceId(ServiceCtx context) public ResultCode OpenSaveDataInfoReaderBySaveDataSpaceId(ServiceCtx context)
{ {
SaveDataSpaceId spaceId = (SaveDataSpaceId)context.RequestData.ReadByte(); SaveDataSpaceId spaceId = (SaveDataSpaceId)context.RequestData.ReadByte();
using var infoReader = new SharedRef<LibHac.FsSrv.Sf.ISaveDataInfoReader>(); using SharedRef<LibHac.FsSrv.Sf.ISaveDataInfoReader> infoReader = new();
Result result = _baseFileSystemProxy.Get.OpenSaveDataInfoReaderBySaveDataSpaceId(ref infoReader.Ref, spaceId); Result result = _baseFileSystemProxy.Get.OpenSaveDataInfoReaderBySaveDataSpaceId(ref infoReader.Ref, spaceId);
if (result.IsFailure()) if (result.IsFailure())
@ -501,7 +504,7 @@ namespace Ryujinx.HLE.HOS.Services.Fs
// OpenSaveDataInfoReaderOnlyCacheStorage() -> object<nn::fssrv::sf::ISaveDataInfoReader> // OpenSaveDataInfoReaderOnlyCacheStorage() -> object<nn::fssrv::sf::ISaveDataInfoReader>
public ResultCode OpenSaveDataInfoReaderOnlyCacheStorage(ServiceCtx context) public ResultCode OpenSaveDataInfoReaderOnlyCacheStorage(ServiceCtx context)
{ {
using var infoReader = new SharedRef<LibHac.FsSrv.Sf.ISaveDataInfoReader>(); using SharedRef<LibHac.FsSrv.Sf.ISaveDataInfoReader> infoReader = new();
Result result = _baseFileSystemProxy.Get.OpenSaveDataInfoReaderOnlyCacheStorage(ref infoReader.Ref); Result result = _baseFileSystemProxy.Get.OpenSaveDataInfoReaderOnlyCacheStorage(ref infoReader.Ref);
if (result.IsFailure()) if (result.IsFailure())
@ -520,7 +523,7 @@ namespace Ryujinx.HLE.HOS.Services.Fs
{ {
SaveDataSpaceId spaceId = (SaveDataSpaceId)context.RequestData.ReadInt64(); SaveDataSpaceId spaceId = (SaveDataSpaceId)context.RequestData.ReadInt64();
ulong saveDataId = context.RequestData.ReadUInt64(); ulong saveDataId = context.RequestData.ReadUInt64();
using var fileSystem = new SharedRef<IFileSystem>(); using SharedRef<IFileSystem> fileSystem = new();
Result result = _baseFileSystemProxy.Get.OpenSaveDataInternalStorageFileSystem(ref fileSystem.Ref, spaceId, saveDataId); Result result = _baseFileSystemProxy.Get.OpenSaveDataInternalStorageFileSystem(ref fileSystem.Ref, spaceId, saveDataId);
if (result.IsFailure()) if (result.IsFailure())
@ -567,7 +570,7 @@ namespace Ryujinx.HLE.HOS.Services.Fs
ulong bufferAddress = context.Request.ReceiveBuff[0].Position; ulong bufferAddress = context.Request.ReceiveBuff[0].Position;
ulong bufferLen = context.Request.ReceiveBuff[0].Size; ulong bufferLen = context.Request.ReceiveBuff[0].Size;
using var region = context.Memory.GetWritableRegion(bufferAddress, (int)bufferLen, true); using WritableRegion region = context.Memory.GetWritableRegion(bufferAddress, (int)bufferLen, true);
Result result = _baseFileSystemProxy.Get.FindSaveDataWithFilter(out long count, new OutBuffer(region.Memory.Span), spaceId, in filter); Result result = _baseFileSystemProxy.Get.FindSaveDataWithFilter(out long count, new OutBuffer(region.Memory.Span), spaceId, in filter);
if (result.IsFailure()) if (result.IsFailure())
{ {
@ -584,7 +587,7 @@ namespace Ryujinx.HLE.HOS.Services.Fs
{ {
SaveDataSpaceId spaceId = (SaveDataSpaceId)context.RequestData.ReadInt64(); SaveDataSpaceId spaceId = (SaveDataSpaceId)context.RequestData.ReadInt64();
SaveDataFilter filter = context.RequestData.ReadStruct<SaveDataFilter>(); SaveDataFilter filter = context.RequestData.ReadStruct<SaveDataFilter>();
using var infoReader = new SharedRef<LibHac.FsSrv.Sf.ISaveDataInfoReader>(); using SharedRef<LibHac.FsSrv.Sf.ISaveDataInfoReader> infoReader = new();
Result result = _baseFileSystemProxy.Get.OpenSaveDataInfoReaderWithFilter(ref infoReader.Ref, spaceId, in filter); Result result = _baseFileSystemProxy.Get.OpenSaveDataInfoReaderWithFilter(ref infoReader.Ref, spaceId, in filter);
if (result.IsFailure()) if (result.IsFailure())
@ -661,7 +664,7 @@ namespace Ryujinx.HLE.HOS.Services.Fs
SaveDataSpaceId spaceId = (SaveDataSpaceId)context.RequestData.ReadInt32(); SaveDataSpaceId spaceId = (SaveDataSpaceId)context.RequestData.ReadInt32();
SaveDataMetaType metaType = (SaveDataMetaType)context.RequestData.ReadInt32(); SaveDataMetaType metaType = (SaveDataMetaType)context.RequestData.ReadInt32();
SaveDataAttribute attribute = context.RequestData.ReadStruct<SaveDataAttribute>(); SaveDataAttribute attribute = context.RequestData.ReadStruct<SaveDataAttribute>();
using var file = new SharedRef<LibHac.FsSrv.Sf.IFile>(); using SharedRef<LibHac.FsSrv.Sf.IFile> file = new();
Result result = _baseFileSystemProxy.Get.OpenSaveDataMetaFile(ref file.Ref, spaceId, in attribute, metaType); Result result = _baseFileSystemProxy.Get.OpenSaveDataMetaFile(ref file.Ref, spaceId, in attribute, metaType);
if (result.IsFailure()) if (result.IsFailure())
@ -699,7 +702,7 @@ namespace Ryujinx.HLE.HOS.Services.Fs
public ResultCode OpenImageDirectoryFileSystem(ServiceCtx context) public ResultCode OpenImageDirectoryFileSystem(ServiceCtx context)
{ {
ImageDirectoryId directoryId = (ImageDirectoryId)context.RequestData.ReadInt32(); ImageDirectoryId directoryId = (ImageDirectoryId)context.RequestData.ReadInt32();
using var fileSystem = new SharedRef<IFileSystem>(); using SharedRef<IFileSystem> fileSystem = new();
Result result = _baseFileSystemProxy.Get.OpenImageDirectoryFileSystem(ref fileSystem.Ref, directoryId); Result result = _baseFileSystemProxy.Get.OpenImageDirectoryFileSystem(ref fileSystem.Ref, directoryId);
if (result.IsFailure()) if (result.IsFailure())
@ -716,7 +719,7 @@ namespace Ryujinx.HLE.HOS.Services.Fs
public ResultCode OpenBaseFileSystem(ServiceCtx context) public ResultCode OpenBaseFileSystem(ServiceCtx context)
{ {
BaseFileSystemId fileSystemId = (BaseFileSystemId)context.RequestData.ReadInt32(); BaseFileSystemId fileSystemId = (BaseFileSystemId)context.RequestData.ReadInt32();
using var fileSystem = new SharedRef<IFileSystem>(); using SharedRef<IFileSystem> fileSystem = new();
Result result = _baseFileSystemProxy.Get.OpenBaseFileSystem(ref fileSystem.Ref, fileSystemId); Result result = _baseFileSystemProxy.Get.OpenBaseFileSystem(ref fileSystem.Ref, fileSystemId);
if (result.IsFailure()) if (result.IsFailure())
@ -733,7 +736,7 @@ namespace Ryujinx.HLE.HOS.Services.Fs
public ResultCode OpenContentStorageFileSystem(ServiceCtx context) public ResultCode OpenContentStorageFileSystem(ServiceCtx context)
{ {
ContentStorageId contentStorageId = (ContentStorageId)context.RequestData.ReadInt32(); ContentStorageId contentStorageId = (ContentStorageId)context.RequestData.ReadInt32();
using var fileSystem = new SharedRef<IFileSystem>(); using SharedRef<IFileSystem> fileSystem = new();
Result result = _baseFileSystemProxy.Get.OpenContentStorageFileSystem(ref fileSystem.Ref, contentStorageId); Result result = _baseFileSystemProxy.Get.OpenContentStorageFileSystem(ref fileSystem.Ref, contentStorageId);
if (result.IsFailure()) if (result.IsFailure())
@ -750,24 +753,16 @@ namespace Ryujinx.HLE.HOS.Services.Fs
public ResultCode OpenCloudBackupWorkStorageFileSystem(ServiceCtx context) public ResultCode OpenCloudBackupWorkStorageFileSystem(ServiceCtx context)
{ {
CloudBackupWorkStorageId storageId = (CloudBackupWorkStorageId)context.RequestData.ReadInt32(); CloudBackupWorkStorageId storageId = (CloudBackupWorkStorageId)context.RequestData.ReadInt32();
using var fileSystem = new SharedRef<IFileSystem>();
Result result = _baseFileSystemProxy.Get.OpenCloudBackupWorkStorageFileSystem(ref fileSystem.Ref, storageId); Logger.Stub?.PrintStub(LogClass.ServiceFs, new { storageId });
if (result.IsFailure()) throw new NotImplementedException(); // reimplementing behavior from LibHac 0.19.0
{
return (ResultCode)result.Value;
}
MakeObject(context, new FileSystemProxy.IFileSystem(ref fileSystem.Ref));
return ResultCode.Success;
} }
[CommandCmif(130)] [CommandCmif(130)]
public ResultCode OpenCustomStorageFileSystem(ServiceCtx context) public ResultCode OpenCustomStorageFileSystem(ServiceCtx context)
{ {
CustomStorageId customStorageId = (CustomStorageId)context.RequestData.ReadInt32(); CustomStorageId customStorageId = (CustomStorageId)context.RequestData.ReadInt32();
using var fileSystem = new SharedRef<IFileSystem>(); using SharedRef<IFileSystem> fileSystem = new();
Result result = _baseFileSystemProxy.Get.OpenCustomStorageFileSystem(ref fileSystem.Ref, customStorageId); Result result = _baseFileSystemProxy.Get.OpenCustomStorageFileSystem(ref fileSystem.Ref, customStorageId);
if (result.IsFailure()) if (result.IsFailure())
@ -784,9 +779,9 @@ namespace Ryujinx.HLE.HOS.Services.Fs
// OpenDataStorageByCurrentProcess() -> object<nn::fssrv::sf::IStorage> dataStorage // OpenDataStorageByCurrentProcess() -> object<nn::fssrv::sf::IStorage> dataStorage
public ResultCode OpenDataStorageByCurrentProcess(ServiceCtx context) public ResultCode OpenDataStorageByCurrentProcess(ServiceCtx context)
{ {
var storage = context.Device.FileSystem.GetRomFs(_pid).AsStorage(true); LibHac.Fs.IStorage storage = context.Device.FileSystem.GetRomFs(_pid).AsStorage(true);
using var sharedStorage = new SharedRef<LibHac.Fs.IStorage>(storage); using SharedRef<LibHac.Fs.IStorage> sharedStorage = new(storage);
using var sfStorage = new SharedRef<IStorage>(new StorageInterfaceAdapter(ref sharedStorage.Ref)); using SharedRef<IStorage> sfStorage = new(new StorageInterfaceAdapter(ref sharedStorage.Ref));
MakeObject(context, new FileSystemProxy.IStorage(ref sfStorage.Ref)); MakeObject(context, new FileSystemProxy.IStorage(ref sfStorage.Ref));
@ -809,9 +804,9 @@ namespace Ryujinx.HLE.HOS.Services.Fs
{ {
Logger.Info?.Print(LogClass.Loader, $"Opened AddOnContent Data TitleID={titleId:X16}"); Logger.Info?.Print(LogClass.Loader, $"Opened AddOnContent Data TitleID={titleId:X16}");
var storage = context.Device.FileSystem.ModLoader.ApplyRomFsMods(titleId, aocStorage); LibHac.Fs.IStorage storage = context.Device.FileSystem.ModLoader.ApplyRomFsMods(titleId, aocStorage);
using var sharedStorage = new SharedRef<LibHac.Fs.IStorage>(storage); using SharedRef<LibHac.Fs.IStorage> sharedStorage = new(storage);
using var sfStorage = new SharedRef<IStorage>(new StorageInterfaceAdapter(ref sharedStorage.Ref)); using SharedRef<IStorage> sfStorage = new(new StorageInterfaceAdapter(ref sharedStorage.Ref));
MakeObject(context, new FileSystemProxy.IStorage(ref sfStorage.Ref)); MakeObject(context, new FileSystemProxy.IStorage(ref sfStorage.Ref));
@ -845,8 +840,8 @@ namespace Ryujinx.HLE.HOS.Services.Fs
LibHac.Fs.IStorage ncaStorage = new LocalStorage(ncaPath, FileAccess.Read, FileMode.Open); LibHac.Fs.IStorage ncaStorage = new LocalStorage(ncaPath, FileAccess.Read, FileMode.Open);
Nca nca = new(context.Device.System.KeySet, ncaStorage); Nca nca = new(context.Device.System.KeySet, ncaStorage);
LibHac.Fs.IStorage romfsStorage = nca.OpenStorage(NcaSectionType.Data, context.Device.System.FsIntegrityCheckLevel); LibHac.Fs.IStorage romfsStorage = nca.OpenStorage(NcaSectionType.Data, context.Device.System.FsIntegrityCheckLevel);
using var sharedStorage = new SharedRef<LibHac.Fs.IStorage>(romfsStorage); using SharedRef<LibHac.Fs.IStorage> sharedStorage = new(romfsStorage);
using var sfStorage = new SharedRef<IStorage>(new StorageInterfaceAdapter(ref sharedStorage.Ref)); using SharedRef<IStorage> sfStorage = new(new StorageInterfaceAdapter(ref sharedStorage.Ref));
MakeObject(context, new FileSystemProxy.IStorage(ref sfStorage.Ref)); MakeObject(context, new FileSystemProxy.IStorage(ref sfStorage.Ref));
} }
@ -875,9 +870,9 @@ namespace Ryujinx.HLE.HOS.Services.Fs
// OpenPatchDataStorageByCurrentProcess() -> object<nn::fssrv::sf::IStorage> // OpenPatchDataStorageByCurrentProcess() -> object<nn::fssrv::sf::IStorage>
public ResultCode OpenPatchDataStorageByCurrentProcess(ServiceCtx context) public ResultCode OpenPatchDataStorageByCurrentProcess(ServiceCtx context)
{ {
var storage = context.Device.FileSystem.GetRomFs(_pid).AsStorage(true); LibHac.Fs.IStorage storage = context.Device.FileSystem.GetRomFs(_pid).AsStorage(true);
using var sharedStorage = new SharedRef<LibHac.Fs.IStorage>(storage); using SharedRef<LibHac.Fs.IStorage> sharedStorage = new(storage);
using var sfStorage = new SharedRef<IStorage>(new StorageInterfaceAdapter(ref sharedStorage.Ref)); using SharedRef<IStorage> sfStorage = new(new StorageInterfaceAdapter(ref sharedStorage.Ref));
MakeObject(context, new FileSystemProxy.IStorage(ref sfStorage.Ref)); MakeObject(context, new FileSystemProxy.IStorage(ref sfStorage.Ref));
@ -895,9 +890,9 @@ namespace Ryujinx.HLE.HOS.Services.Fs
throw new NotImplementedException($"Accessing storage from other programs is not supported (program index = {programIndex})."); throw new NotImplementedException($"Accessing storage from other programs is not supported (program index = {programIndex}).");
} }
var storage = context.Device.FileSystem.GetRomFs(_pid).AsStorage(true); LibHac.Fs.IStorage storage = context.Device.FileSystem.GetRomFs(_pid).AsStorage(true);
using var sharedStorage = new SharedRef<LibHac.Fs.IStorage>(storage); using SharedRef<LibHac.Fs.IStorage> sharedStorage = new(storage);
using var sfStorage = new SharedRef<IStorage>(new StorageInterfaceAdapter(ref sharedStorage.Ref)); using SharedRef<IStorage> sfStorage = new(new StorageInterfaceAdapter(ref sharedStorage.Ref));
MakeObject(context, new FileSystemProxy.IStorage(ref sfStorage.Ref)); MakeObject(context, new FileSystemProxy.IStorage(ref sfStorage.Ref));
@ -908,7 +903,7 @@ namespace Ryujinx.HLE.HOS.Services.Fs
// OpenDataStorageByCurrentProcess() -> object<nn::fssrv::sf::IStorage> dataStorage // OpenDataStorageByCurrentProcess() -> object<nn::fssrv::sf::IStorage> dataStorage
public ResultCode OpenDeviceOperator(ServiceCtx context) public ResultCode OpenDeviceOperator(ServiceCtx context)
{ {
using var deviceOperator = new SharedRef<LibHac.FsSrv.Sf.IDeviceOperator>(); using SharedRef<LibHac.FsSrv.Sf.IDeviceOperator> deviceOperator = new();
Result result = _baseFileSystemProxy.Get.OpenDeviceOperator(ref deviceOperator.Ref); Result result = _baseFileSystemProxy.Get.OpenDeviceOperator(ref deviceOperator.Ref);
if (result.IsFailure()) if (result.IsFailure())
@ -1023,9 +1018,9 @@ namespace Ryujinx.HLE.HOS.Services.Fs
[CommandCmif(609)] [CommandCmif(609)]
public ResultCode GetRightsIdByPath(ServiceCtx context) public ResultCode GetRightsIdByPath(ServiceCtx context)
{ {
ref readonly var path = ref FileSystemProxyHelper.GetFspPath(context); ref readonly FspPath path = ref FileSystemProxyHelper.GetFspPath(context);
Result result = _baseFileSystemProxy.Get.GetRightsIdByPath(out RightsId rightsId, in path); Result result = _baseFileSystemProxy.Get.GetRightsIdAndKeyGenerationByPath(out RightsId rightsId, out _, in path, ContentAttributes.None);
if (result.IsFailure()) if (result.IsFailure())
{ {
return (ResultCode)result.Value; return (ResultCode)result.Value;
@ -1039,9 +1034,9 @@ namespace Ryujinx.HLE.HOS.Services.Fs
[CommandCmif(610)] [CommandCmif(610)]
public ResultCode GetRightsIdAndKeyGenerationByPath(ServiceCtx context) public ResultCode GetRightsIdAndKeyGenerationByPath(ServiceCtx context)
{ {
ref readonly var path = ref FileSystemProxyHelper.GetFspPath(context); ref readonly FspPath path = ref FileSystemProxyHelper.GetFspPath(context);
Result result = _baseFileSystemProxy.Get.GetRightsIdAndKeyGenerationByPath(out RightsId rightsId, out byte keyGeneration, in path); Result result = _baseFileSystemProxy.Get.GetRightsIdAndKeyGenerationByPath(out RightsId rightsId, out byte keyGeneration, in path, ContentAttributes.None);
if (result.IsFailure()) if (result.IsFailure())
{ {
return (ResultCode)result.Value; return (ResultCode)result.Value;
@ -1236,9 +1231,11 @@ namespace Ryujinx.HLE.HOS.Services.Fs
public ResultCode SetBisRootForHost(ServiceCtx context) public ResultCode SetBisRootForHost(ServiceCtx context)
{ {
BisPartitionId partitionId = (BisPartitionId)context.RequestData.ReadInt32(); BisPartitionId partitionId = (BisPartitionId)context.RequestData.ReadInt32();
ref readonly var path = ref FileSystemProxyHelper.GetFspPath(context); ref readonly FspPath path = ref FileSystemProxyHelper.GetFspPath(context);
return (ResultCode)_baseFileSystemProxy.Get.SetBisRootForHost(partitionId, in path).Value; Logger.Stub?.PrintStub(LogClass.ServiceFs, new { partitionId, path });
throw new NotImplementedException(); // reimplementing behavior from LibHac 0.19.0
} }
[CommandCmif(1001)] [CommandCmif(1001)]
@ -1253,7 +1250,7 @@ namespace Ryujinx.HLE.HOS.Services.Fs
[CommandCmif(1002)] [CommandCmif(1002)]
public ResultCode SetSaveDataRootPath(ServiceCtx context) public ResultCode SetSaveDataRootPath(ServiceCtx context)
{ {
ref readonly var path = ref FileSystemProxyHelper.GetFspPath(context); ref readonly FspPath path = ref FileSystemProxyHelper.GetFspPath(context);
return (ResultCode)_baseFileSystemProxy.Get.SetSaveDataRootPath(in path).Value; return (ResultCode)_baseFileSystemProxy.Get.SetSaveDataRootPath(in path).Value;
} }
@ -1307,7 +1304,7 @@ namespace Ryujinx.HLE.HOS.Services.Fs
[CommandCmif(1008)] [CommandCmif(1008)]
public ResultCode OpenRegisteredUpdatePartition(ServiceCtx context) public ResultCode OpenRegisteredUpdatePartition(ServiceCtx context)
{ {
using var fileSystem = new SharedRef<IFileSystem>(); using SharedRef<IFileSystem> fileSystem = new();
Result result = _baseFileSystemProxy.Get.OpenRegisteredUpdatePartition(ref fileSystem.Ref); Result result = _baseFileSystemProxy.Get.OpenRegisteredUpdatePartition(ref fileSystem.Ref);
if (result.IsFailure()) if (result.IsFailure())
@ -1417,7 +1414,7 @@ namespace Ryujinx.HLE.HOS.Services.Fs
// OpenMultiCommitManager() -> object<nn::fssrv::sf::IMultiCommitManager> // OpenMultiCommitManager() -> object<nn::fssrv::sf::IMultiCommitManager>
public ResultCode OpenMultiCommitManager(ServiceCtx context) public ResultCode OpenMultiCommitManager(ServiceCtx context)
{ {
using var commitManager = new SharedRef<LibHac.FsSrv.Sf.IMultiCommitManager>(); using SharedRef<LibHac.FsSrv.Sf.IMultiCommitManager> commitManager = new();
Result result = _baseFileSystemProxy.Get.OpenMultiCommitManager(ref commitManager.Ref); Result result = _baseFileSystemProxy.Get.OpenMultiCommitManager(ref commitManager.Ref);
if (result.IsFailure()) if (result.IsFailure())

View file

@ -17,7 +17,7 @@ namespace Ryujinx.HLE.HOS.Services.Ldn.UserServiceCreator
NetworkError ConnectPrivate(ConnectPrivateRequest request); NetworkError ConnectPrivate(ConnectPrivateRequest request);
ResultCode Reject(DisconnectReason disconnectReason, uint nodeId); ResultCode Reject(DisconnectReason disconnectReason, uint nodeId);
NetworkInfo[] Scan(ushort channel, ScanFilter scanFilter); NetworkInfo[] Scan(ushort channel, ScanFilter scanFilter);
void SetGameVersion(byte[] versionString); void SetGameVersion(ReadOnlySpan<byte> versionString);
void SetStationAcceptPolicy(AcceptPolicy acceptPolicy); void SetStationAcceptPolicy(AcceptPolicy acceptPolicy);
void SetAdvertiseData(byte[] data); void SetAdvertiseData(byte[] data);
bool CreateNetwork(CreateAccessPointRequest request, byte[] advertiseData); bool CreateNetwork(CreateAccessPointRequest request, byte[] advertiseData);

View file

@ -65,7 +65,7 @@ namespace Ryujinx.HLE.HOS.Services.Ldn.UserServiceCreator
// TODO: Call nn::arp::GetApplicationControlProperty here when implemented. // TODO: Call nn::arp::GetApplicationControlProperty here when implemented.
ApplicationControlProperty controlProperty = context.Device.Processes.ActiveApplication.ApplicationControlProperties; ApplicationControlProperty controlProperty = context.Device.Processes.ActiveApplication.ApplicationControlProperties;
foreach (var localCommunicationId in controlProperty.LocalCommunicationId.ItemsRo) foreach (ulong localCommunicationId in controlProperty.LocalCommunicationId)
{ {
if (localCommunicationId == localCommunicationIdChecked) if (localCommunicationId == localCommunicationIdChecked)
{ {
@ -1105,7 +1105,7 @@ namespace Ryujinx.HLE.HOS.Services.Ldn.UserServiceCreator
} }
catch (Exception ex) catch (Exception ex)
{ {
Logger.Error?.Print(LogClass.ServiceLdn, "Could not locate LdnRyu server. Defaulting to stubbed wireless."); Logger.Error?.Print(LogClass.ServiceLdn, "Could not locate RyuLDN server. Defaulting to stubbed wireless.");
Logger.Error?.Print(LogClass.ServiceLdn, ex.Message); Logger.Error?.Print(LogClass.ServiceLdn, ex.Message);
NetworkClient = new LdnDisabledClient(); NetworkClient = new LdnDisabledClient();
} }
@ -1119,7 +1119,7 @@ namespace Ryujinx.HLE.HOS.Services.Ldn.UserServiceCreator
} }
// TODO: Call nn::arp::GetApplicationLaunchProperty here when implemented. // TODO: Call nn::arp::GetApplicationLaunchProperty here when implemented.
NetworkClient.SetGameVersion(context.Device.Processes.ActiveApplication.ApplicationControlProperties.DisplayVersion.Items.ToArray()); NetworkClient.SetGameVersion(context.Device.Processes.ActiveApplication.ApplicationControlProperties.DisplayVersion);
resultCode = ResultCode.Success; resultCode = ResultCode.Success;

View file

@ -61,7 +61,7 @@ namespace Ryujinx.HLE.HOS.Services.Ldn.UserServiceCreator
public void SetAdvertiseData(byte[] data) { } public void SetAdvertiseData(byte[] data) { }
public void SetGameVersion(byte[] versionString) { } public void SetGameVersion(ReadOnlySpan<byte> versionString) { }
public void SetStationAcceptPolicy(AcceptPolicy acceptPolicy) { } public void SetStationAcceptPolicy(AcceptPolicy acceptPolicy) { }

View file

@ -85,7 +85,7 @@ namespace Ryujinx.HLE.HOS.Services.Ldn.UserServiceCreator.LdnMitm
_lanDiscovery.SetAdvertiseData(data); _lanDiscovery.SetAdvertiseData(data);
} }
public void SetGameVersion(byte[] versionString) public void SetGameVersion(ReadOnlySpan<byte> versionString)
{ {
// NOTE: This method is not implemented in ldn_mitm // NOTE: This method is not implemented in ldn_mitm
Logger.Stub?.PrintMsg(LogClass.ServiceLdn, "LdnMitmClient SetGameVersion"); Logger.Stub?.PrintMsg(LogClass.ServiceLdn, "LdnMitmClient SetGameVersion");

View file

@ -346,9 +346,9 @@ namespace Ryujinx.HLE.HOS.Services.Ldn.UserServiceCreator.LdnRyu
} }
} }
public void SetGameVersion(byte[] versionString) public void SetGameVersion(ReadOnlySpan<byte> versionString)
{ {
_gameVersion = versionString; _gameVersion = versionString.ToArray();
if (_gameVersion.Length < 0x10) if (_gameVersion.Length < 0x10)
{ {

View file

@ -55,7 +55,13 @@ namespace Ryujinx.HLE.HOS.Services.Pctl.ParentalControlServiceFactory
_titleId = titleId; _titleId = titleId;
// TODO: Call nn::arp::GetApplicationControlProperty here when implemented, if it return ResultCode.Success we assign fields. // TODO: Call nn::arp::GetApplicationControlProperty here when implemented, if it return ResultCode.Success we assign fields.
_ratingAge = Array.ConvertAll(context.Device.Processes.ActiveApplication.ApplicationControlProperties.RatingAge.ItemsRo.ToArray(), Convert.ToInt32); _ratingAge = new int[context.Device.Processes.ActiveApplication.ApplicationControlProperties.RatingAge.Length];
for (int i = 0; i < _ratingAge.Length; i++)
{
_ratingAge[i] = Convert.ToInt32(context.Device.Processes.ActiveApplication.ApplicationControlProperties.RatingAge[i]);
}
_parentalControlFlag = context.Device.Processes.ActiveApplication.ApplicationControlProperties.ParentalControlFlag; _parentalControlFlag = context.Device.Processes.ActiveApplication.ApplicationControlProperties.ParentalControlFlag;
} }
} }

View file

@ -45,7 +45,7 @@ namespace Ryujinx.HLE.HOS.Services.Sdb.Pdm.QueryService
// Check if input title ids are in the whitelist. // Check if input title ids are in the whitelist.
foreach (ulong titleId in titleIds) foreach (ulong titleId in titleIds)
{ {
if (!context.Device.Processes.ActiveApplication.ApplicationControlProperties.PlayLogQueryableApplicationId.ItemsRo.Contains(titleId)) if (!context.Device.Processes.ActiveApplication.ApplicationControlProperties.PlayLogQueryableApplicationId.AsReadOnlySpan().Contains(titleId))
{ {
return (ResultCode)Am.ResultCode.ObjectInvalid; return (ResultCode)Am.ResultCode.ObjectInvalid;
} }

View file

@ -90,7 +90,13 @@ namespace Ryujinx.HLE.Loaders.Processes.Extensions
if (string.IsNullOrWhiteSpace(programName)) if (string.IsNullOrWhiteSpace(programName))
{ {
programName = Array.Find(nacpData.Value.Title.ItemsRo.ToArray(), x => x.Name[0] != 0).NameString.ToString(); foreach (ApplicationControlProperty.ApplicationTitle appTitle in nacpData.Value.Title)
{
if (appTitle.Name[0] != 0)
continue;
programName = appTitle.NameString.ToString();
}
} }
} }

View file

@ -177,7 +177,13 @@ namespace Ryujinx.HLE.Loaders.Processes
if (string.IsNullOrWhiteSpace(programName)) if (string.IsNullOrWhiteSpace(programName))
{ {
programName = Array.Find(nacpData.Value.Title.ItemsRo.ToArray(), x => x.Name[0] != 0).NameString.ToString(); foreach (ApplicationControlProperty.ApplicationTitle nacpTitles in nacpData.Value.Title)
{
if (nacpTitles.Name[0] != 0)
continue;
programName = nacpTitles.NameString.ToString();
}
} }
if (nacpData.Value.PresenceGroupId != 0) if (nacpData.Value.PresenceGroupId != 0)

View file

@ -179,7 +179,7 @@ namespace Ryujinx.HLE.Loaders.Processes
KProcess process = new(context); KProcess process = new(context);
var processContextFactory = new ArmProcessContextFactory( ArmProcessContextFactory processContextFactory = new(
context.Device.System.TickSource, context.Device.System.TickSource,
context.Device.Gpu, context.Device.Gpu,
string.Empty, string.Empty,
@ -236,7 +236,7 @@ namespace Ryujinx.HLE.Loaders.Processes
{ {
context.Device.System.ServiceTable.WaitServicesReady(); context.Device.System.ServiceTable.WaitServicesReady();
LibHac.Result resultCode = metaLoader.GetNpdm(out var npdm); LibHac.Result resultCode = metaLoader.GetNpdm(out LibHac.Loader.Npdm npdm);
if (resultCode.IsFailure()) if (resultCode.IsFailure())
{ {
@ -245,22 +245,22 @@ namespace Ryujinx.HLE.Loaders.Processes
return ProcessResult.Failed; return ProcessResult.Failed;
} }
ref readonly var meta = ref npdm.Meta; ref readonly Meta meta = ref npdm.Meta;
ulong argsStart = 0; ulong argsStart = 0;
uint argsSize = 0; uint argsSize = 0;
ulong codeStart = ((meta.Flags & 1) != 0 ? 0x8000000UL : 0x200000UL) + CodeStartOffset; ulong codeStart = ((meta.Flags & 1) != 0 ? 0x8000000UL : 0x200000UL) + CodeStartOffset;
uint codeSize = 0; uint codeSize = 0;
var buildIds = new string[executables.Length]; string[] buildIds = new string[executables.Length];
for (int i = 0; i < executables.Length; i++) for (int i = 0; i < executables.Length; i++)
{ {
buildIds[i] = (executables[i] switch buildIds[i] = (executables[i] switch
{ {
NsoExecutable nso => Convert.ToHexString(nso.BuildId.ItemsRo.ToArray()), NsoExecutable nso => Convert.ToHexString(nso.BuildId),
NroExecutable nro => Convert.ToHexString(nro.Header.BuildId), NroExecutable nro => Convert.ToHexString(nro.Header.BuildId),
_ => "", _ => string.Empty
}).ToUpper(); }).ToUpper();
} }
@ -374,7 +374,7 @@ namespace Ryujinx.HLE.Loaders.Processes
displayVersion = device.System.ContentManager.GetCurrentFirmwareVersion()?.VersionString ?? string.Empty; displayVersion = device.System.ContentManager.GetCurrentFirmwareVersion()?.VersionString ?? string.Empty;
} }
var processContextFactory = new ArmProcessContextFactory( ArmProcessContextFactory processContextFactory = new(
context.Device.System.TickSource, context.Device.System.TickSource,
context.Device.Gpu, context.Device.Gpu,
$"{programId:x16}", $"{programId:x16}",

View file

@ -59,7 +59,13 @@ namespace Ryujinx.HLE.Loaders.Processes
if (string.IsNullOrWhiteSpace(Name)) if (string.IsNullOrWhiteSpace(Name))
{ {
Name = Array.Find(ApplicationControlProperties.Title.ItemsRo.ToArray(), x => x.Name[0] != 0).NameString.ToString(); foreach (ApplicationControlProperty.ApplicationTitle appTitle in ApplicationControlProperties.Title)
{
if (appTitle.Name[0] != 0)
continue;
Name = appTitle.NameString.ToString();
}
} }
DisplayVersion = ApplicationControlProperties.DisplayVersionString.ToString(); DisplayVersion = ApplicationControlProperties.DisplayVersionString.ToString();

View file

@ -162,7 +162,7 @@ namespace Ryujinx.UI.App.Common
NsoReader reader = new(); NsoReader reader = new();
reader.Initialize(nsoFile.Release().AsStorage().AsFile(OpenMode.Read)).ThrowIfFailure(); reader.Initialize(nsoFile.Release().AsStorage().AsFile(OpenMode.Read)).ThrowIfFailure();
return Convert.ToHexString(reader.Header.ModuleId.ItemsRo.ToArray()).Replace("-", "").ToUpper()[..16]; return Convert.ToHexString(reader.Header.ModuleId).Replace("-", "").ToUpper()[..16];
} }
} }
} }

View file

@ -1343,7 +1343,7 @@ namespace Ryujinx.UI.App.Common
{ {
_ = Enum.TryParse(DesiredLanguage.ToString(), out TitleLanguage desiredTitleLanguage); _ = Enum.TryParse(DesiredLanguage.ToString(), out TitleLanguage desiredTitleLanguage);
if (controlData.Title.ItemsRo.Length > (int)desiredTitleLanguage) if (controlData.Title.Length > (int)desiredTitleLanguage)
{ {
data.Name = controlData.Title[(int)desiredTitleLanguage].NameString.ToString(); data.Name = controlData.Title[(int)desiredTitleLanguage].NameString.ToString();
data.Developer = controlData.Title[(int)desiredTitleLanguage].PublisherString.ToString(); data.Developer = controlData.Title[(int)desiredTitleLanguage].PublisherString.ToString();
@ -1356,7 +1356,7 @@ namespace Ryujinx.UI.App.Common
if (string.IsNullOrWhiteSpace(data.Name)) if (string.IsNullOrWhiteSpace(data.Name))
{ {
foreach (ref readonly var controlTitle in controlData.Title.ItemsRo) foreach (ref readonly var controlTitle in controlData.Title)
{ {
if (!controlTitle.NameString.IsEmpty()) if (!controlTitle.NameString.IsEmpty())
{ {
@ -1369,7 +1369,7 @@ namespace Ryujinx.UI.App.Common
if (string.IsNullOrWhiteSpace(data.Developer)) if (string.IsNullOrWhiteSpace(data.Developer))
{ {
foreach (ref readonly var controlTitle in controlData.Title.ItemsRo) foreach (ref readonly var controlTitle in controlData.Title)
{ {
if (!controlTitle.PublisherString.IsEmpty()) if (!controlTitle.PublisherString.IsEmpty())
{ {

View file

@ -193,7 +193,7 @@ namespace Ryujinx.Ava.UI.Windows
{ {
if (application.ControlHolder.ByteSpan.Length > 0 && ViewModel.LastLdnGameData != null) if (application.ControlHolder.ByteSpan.Length > 0 && ViewModel.LastLdnGameData != null)
{ {
IEnumerable<LdnGameData> ldnGameData = ViewModel.LastLdnGameData.Where(game => application.ControlHolder.Value.LocalCommunicationId.Items.Contains(Convert.ToUInt64(game.TitleId, 16))); IEnumerable<LdnGameData> ldnGameData = ViewModel.LastLdnGameData.Where(game => application.ControlHolder.Value.LocalCommunicationId.AsSpan().Contains(Convert.ToUInt64(game.TitleId, 16)));
application.PlayerCount = ldnGameData.Sum(game => game.PlayerCount); application.PlayerCount = ldnGameData.Sum(game => game.PlayerCount);
application.GameCount = ldnGameData.Count(); application.GameCount = ldnGameData.Count();