mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-07-25 23:37:11 +02:00
infra: Update LibHac to v0.20.0.
See merge request [ryubing/ryujinx!33](https://git.ryujinx.app/ryubing/ryujinx/-/merge_requests/33)
This commit is contained in:
parent
28b8dc14c7
commit
1d4928e859
18 changed files with 71 additions and 44 deletions
|
@ -791,7 +791,7 @@ namespace Ryujinx.HLE.HOS
|
|||
{
|
||||
string 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'),
|
||||
_ => string.Empty,
|
||||
};
|
||||
|
|
|
@ -16,6 +16,7 @@ using Ryujinx.HLE.HOS.Services.Fs.FileSystemProxy;
|
|||
using Ryujinx.Memory;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using static Ryujinx.HLE.Utilities.StringUtils;
|
||||
using GameCardHandle = System.UInt32;
|
||||
using IFile = Ryujinx.HLE.HOS.Services.Fs.FileSystemProxy.IFile;
|
||||
|
@ -753,17 +754,9 @@ namespace Ryujinx.HLE.HOS.Services.Fs
|
|||
public ResultCode OpenCloudBackupWorkStorageFileSystem(ServiceCtx context)
|
||||
{
|
||||
CloudBackupWorkStorageId storageId = (CloudBackupWorkStorageId)context.RequestData.ReadInt32();
|
||||
using SharedRef<IFileSystem> fileSystem = new();
|
||||
|
||||
Result result = _baseFileSystemProxy.Get.OpenCloudBackupWorkStorageFileSystem(ref fileSystem.Ref, storageId);
|
||||
if (result.IsFailure())
|
||||
{
|
||||
return (ResultCode)result.Value;
|
||||
}
|
||||
|
||||
MakeObject(context, new FileSystemProxy.IFileSystem(ref fileSystem.Ref));
|
||||
|
||||
return ResultCode.Success;
|
||||
|
||||
Logger.Stub?.PrintStub(LogClass.ServiceFs, new { storageId });
|
||||
throw new NotImplementedException(); // reimplementing behavior from LibHac 0.19.0
|
||||
}
|
||||
|
||||
[CommandCmif(130)]
|
||||
|
@ -1028,7 +1021,7 @@ namespace Ryujinx.HLE.HOS.Services.Fs
|
|||
{
|
||||
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 byte _, in path, ContentAttributes.All);
|
||||
if (result.IsFailure())
|
||||
{
|
||||
return (ResultCode)result.Value;
|
||||
|
@ -1044,7 +1037,7 @@ namespace Ryujinx.HLE.HOS.Services.Fs
|
|||
{
|
||||
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.All);
|
||||
if (result.IsFailure())
|
||||
{
|
||||
return (ResultCode)result.Value;
|
||||
|
@ -1240,8 +1233,10 @@ namespace Ryujinx.HLE.HOS.Services.Fs
|
|||
{
|
||||
BisPartitionId partitionId = (BisPartitionId)context.RequestData.ReadInt32();
|
||||
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)]
|
||||
|
|
|
@ -17,7 +17,7 @@ namespace Ryujinx.HLE.HOS.Services.Ldn.UserServiceCreator
|
|||
NetworkError ConnectPrivate(ConnectPrivateRequest request);
|
||||
ResultCode Reject(DisconnectReason disconnectReason, uint nodeId);
|
||||
NetworkInfo[] Scan(ushort channel, ScanFilter scanFilter);
|
||||
void SetGameVersion(byte[] versionString);
|
||||
void SetGameVersion(ReadOnlySpan<byte> versionString);
|
||||
void SetStationAcceptPolicy(AcceptPolicy acceptPolicy);
|
||||
void SetAdvertiseData(byte[] data);
|
||||
bool CreateNetwork(CreateAccessPointRequest request, byte[] advertiseData);
|
||||
|
|
|
@ -62,7 +62,7 @@ namespace Ryujinx.HLE.HOS.Services.Ldn.UserServiceCreator
|
|||
// TODO: Call nn::arp::GetApplicationControlProperty here when implemented.
|
||||
ApplicationControlProperty controlProperty = context.Device.Processes.ActiveApplication.ApplicationControlProperties;
|
||||
|
||||
foreach (ulong localCommunicationId in controlProperty.LocalCommunicationId.ItemsRo)
|
||||
foreach (ulong localCommunicationId in controlProperty.LocalCommunicationId)
|
||||
{
|
||||
if (localCommunicationId == localCommunicationIdChecked)
|
||||
{
|
||||
|
@ -1114,7 +1114,7 @@ namespace Ryujinx.HLE.HOS.Services.Ldn.UserServiceCreator
|
|||
}
|
||||
|
||||
// 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;
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ namespace Ryujinx.HLE.HOS.Services.Ldn.UserServiceCreator
|
|||
|
||||
public void SetAdvertiseData(byte[] data) { }
|
||||
|
||||
public void SetGameVersion(byte[] versionString) { }
|
||||
public void SetGameVersion(ReadOnlySpan<byte> versionString) { }
|
||||
|
||||
public void SetStationAcceptPolicy(AcceptPolicy acceptPolicy) { }
|
||||
|
||||
|
|
|
@ -85,7 +85,7 @@ namespace Ryujinx.HLE.HOS.Services.Ldn.UserServiceCreator.LdnMitm
|
|||
_lanDiscovery.SetAdvertiseData(data);
|
||||
}
|
||||
|
||||
public void SetGameVersion(byte[] versionString)
|
||||
public void SetGameVersion(ReadOnlySpan<byte> versionString)
|
||||
{
|
||||
// NOTE: This method is not implemented in ldn_mitm
|
||||
Logger.Stub?.PrintMsg(LogClass.ServiceLdn, "LdnMitmClient SetGameVersion");
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -55,7 +55,16 @@ namespace Ryujinx.HLE.HOS.Services.Pctl.ParentalControlServiceFactory
|
|||
_titleId = titleId;
|
||||
|
||||
// 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);
|
||||
|
||||
int[] tempRatingAge = new int[32];
|
||||
|
||||
for (int i = 0; i < 32; i++)
|
||||
{
|
||||
tempRatingAge[i] = Convert.ToInt32(context.Device.Processes.ActiveApplication.ApplicationControlProperties.RatingAge[i]);
|
||||
}
|
||||
|
||||
Array.Copy(tempRatingAge, _ratingAge, tempRatingAge.Length);
|
||||
|
||||
_parentalControlFlag = context.Device.Processes.ActiveApplication.ApplicationControlProperties.ParentalControlFlag;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -45,7 +45,10 @@ namespace Ryujinx.HLE.HOS.Services.Sdb.Pdm.QueryService
|
|||
// Check if input title ids are in the whitelist.
|
||||
foreach (ulong titleId in titleIds)
|
||||
{
|
||||
if (!context.Device.Processes.ActiveApplication.ApplicationControlProperties.PlayLogQueryableApplicationId.ItemsRo.Contains(titleId))
|
||||
ReadOnlySpan<ulong> temp = context.Device.Processes.ActiveApplication
|
||||
.ApplicationControlProperties.PlayLogQueryableApplicationId;
|
||||
|
||||
if (!temp.Contains(titleId))
|
||||
{
|
||||
return (ResultCode)Am.ResultCode.ObjectInvalid;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue