mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2026-05-21 12:45:47 +00:00
feature: .NET 10 (ryubing/ryujinx!214)
See merge request ryubing/ryujinx!214
This commit is contained in:
@@ -122,8 +122,8 @@ namespace Ryujinx.HLE.HOS
|
||||
TickSource,
|
||||
device,
|
||||
device.Memory,
|
||||
device.Configuration.MemoryConfiguration.ToKernelMemorySize(),
|
||||
device.Configuration.MemoryConfiguration.ToKernelMemoryArrange());
|
||||
device.Configuration.MemoryConfiguration.KernelMemorySize,
|
||||
device.Configuration.MemoryConfiguration.KernelMemoryArrange);
|
||||
|
||||
Device = device;
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace Ryujinx.HLE.HOS
|
||||
|
||||
public Result GetFileSize(out long size, FileHandle handle)
|
||||
{
|
||||
return _fsClient.GetFileSize(out size, (LibHac.Fs.FileHandle)handle.Value).ToHorizonResult();
|
||||
return _fsClient.GetFileSize(out size, (LibHac.Fs.FileHandle)handle.Value).Horizon;
|
||||
}
|
||||
|
||||
public Result MountSystemData(string mountName, ulong dataId)
|
||||
@@ -58,7 +58,7 @@ namespace Ryujinx.HLE.HOS
|
||||
using IFileSystem ncaFileSystem = nca.OpenFileSystem(NcaSectionType.Data, _system.FsIntegrityCheckLevel);
|
||||
using UniqueRef<IFileSystem> ncaFsRef = new(ncaFileSystem);
|
||||
|
||||
Result result = _fsClient.Register(mountName.ToU8Span(), ref ncaFsRef.Ref).ToHorizonResult();
|
||||
Result result = _fsClient.Register(mountName.ToU8Span(), ref ncaFsRef.Ref).Horizon;
|
||||
if (result.IsFailure)
|
||||
{
|
||||
ncaStorage.Dispose();
|
||||
@@ -74,14 +74,14 @@ namespace Ryujinx.HLE.HOS
|
||||
{
|
||||
ncaStorage?.Dispose();
|
||||
|
||||
return ex.ResultValue.ToHorizonResult();
|
||||
return ex.ResultValue.Horizon;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Return correct result here, this is likely wrong.
|
||||
|
||||
return LibHac.Fs.ResultFs.TargetNotFound.Handle().ToHorizonResult();
|
||||
return LibHac.Fs.ResultFs.TargetNotFound.Handle().Horizon;
|
||||
}
|
||||
|
||||
public Result OpenFile(out FileHandle handle, string path, OpenMode openMode)
|
||||
@@ -89,7 +89,7 @@ namespace Ryujinx.HLE.HOS
|
||||
LibHac.Result result = _fsClient.OpenFile(out LibHac.Fs.FileHandle libhacHandle, path.ToU8Span(), (LibHac.Fs.OpenMode)openMode);
|
||||
handle = new(libhacHandle);
|
||||
|
||||
return result.ToHorizonResult();
|
||||
return result.Horizon;
|
||||
}
|
||||
|
||||
public Result QueryMountSystemDataCacheSize(out long size, ulong dataId)
|
||||
@@ -103,7 +103,7 @@ namespace Ryujinx.HLE.HOS
|
||||
|
||||
public Result ReadFile(FileHandle handle, long offset, Span<byte> destination)
|
||||
{
|
||||
return _fsClient.ReadFile((LibHac.Fs.FileHandle)handle.Value, offset, destination).ToHorizonResult();
|
||||
return _fsClient.ReadFile((LibHac.Fs.FileHandle)handle.Value, offset, destination).Horizon;
|
||||
}
|
||||
|
||||
public void Unmount(string mountName)
|
||||
|
||||
@@ -4,19 +4,16 @@ namespace Ryujinx.HLE.HOS.Kernel.Process
|
||||
{
|
||||
static class CapabilityExtensions
|
||||
{
|
||||
extension(CapabilityType type)
|
||||
{
|
||||
public uint Flag => (uint)type + 1;
|
||||
|
||||
public uint Id => (uint)BitOperations.TrailingZeroCount(type.Flag);
|
||||
}
|
||||
|
||||
public static CapabilityType GetCapabilityType(this uint cap)
|
||||
{
|
||||
return (CapabilityType)(((cap + 1) & ~cap) - 1);
|
||||
}
|
||||
|
||||
public static uint GetFlag(this CapabilityType type)
|
||||
{
|
||||
return (uint)type + 1;
|
||||
}
|
||||
|
||||
public static uint GetId(this CapabilityType type)
|
||||
{
|
||||
return (uint)BitOperations.TrailingZeroCount(type.GetFlag());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@ namespace Ryujinx.HLE.HOS.Kernel.Process
|
||||
return Result.Success;
|
||||
}
|
||||
|
||||
int codeMask = 1 << (32 - BitOperations.LeadingZeroCount(code.GetFlag() + 1));
|
||||
int codeMask = 1 << (32 - BitOperations.LeadingZeroCount(code.Flag + 1));
|
||||
|
||||
// Check if the property was already set.
|
||||
if (((mask0 & codeMask) & 0x1e008) != 0)
|
||||
|
||||
@@ -1316,8 +1316,8 @@ namespace Ryujinx.HLE.HOS.Services.Hid
|
||||
|
||||
context.Memory.Read(context.Request.PtrBuff[1].Position, vibrationValueBuffer);
|
||||
|
||||
Span<VibrationDeviceHandle> deviceHandles = MemoryMarshal.Cast<byte, VibrationDeviceHandle>(vibrationDeviceHandleBuffer);
|
||||
Span<VibrationValue> vibrationValues = MemoryMarshal.Cast<byte, VibrationValue>(vibrationValueBuffer);
|
||||
Span<VibrationDeviceHandle> deviceHandles = MemoryMarshal.Cast<byte, VibrationDeviceHandle>(new Span<byte>(vibrationDeviceHandleBuffer));
|
||||
Span<VibrationValue> vibrationValues = MemoryMarshal.Cast<byte, VibrationValue>(new Span<byte>(vibrationValueBuffer));
|
||||
|
||||
if (!deviceHandles.IsEmpty && vibrationValues.Length == deviceHandles.Length)
|
||||
{
|
||||
|
||||
@@ -64,7 +64,7 @@ namespace Ryujinx.HLE.HOS.Services.Spl
|
||||
#pragma warning disable IDE0059 // Remove unnecessary value assignment
|
||||
SystemVersion version = context.Device.System.ContentManager.GetCurrentFirmwareVersion();
|
||||
#pragma warning restore IDE0059
|
||||
MemorySize memorySize = context.Device.Configuration.MemoryConfiguration.ToKernelMemorySize();
|
||||
MemorySize memorySize = context.Device.Configuration.MemoryConfiguration.KernelMemorySize;
|
||||
|
||||
switch (configItem)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user