aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Horizon/Sdk/Sf/Cmif/DomainServiceObjectProcessor.cs
diff options
context:
space:
mode:
authorAc_K <Acoustik666@gmail.com>2023-01-08 13:13:39 +0100
committerGitHub <noreply@github.com>2023-01-08 12:13:39 +0000
commit550747eac6c0f6da14070c8b6d208bde6f1d1eb9 (patch)
tree1be203777156dae17a4221589c852c638b273d94 /Ryujinx.Horizon/Sdk/Sf/Cmif/DomainServiceObjectProcessor.cs
parent3ffceab1fb220c13f5982de599d788f2e3e7cc47 (diff)
Horizon: Impl Prepo, Fixes bugs, Clean things (#4220)1.1.519
* Horizon: Impl Prepo, Fixes bugs, Clean things * remove ToArray() * resultCode > status * Remove old services * Addresses gdkchan's comments and more cleanup * Addresses Gdkchan's feedback 2 * Reorganize services, make sure service are loaded before guest Co-Authored-By: gdkchan <5624669+gdkchan@users.noreply.github.com> * Create interfaces for lm and sm Co-authored-by: gdkchan <5624669+gdkchan@users.noreply.github.com>
Diffstat (limited to 'Ryujinx.Horizon/Sdk/Sf/Cmif/DomainServiceObjectProcessor.cs')
-rw-r--r--Ryujinx.Horizon/Sdk/Sf/Cmif/DomainServiceObjectProcessor.cs10
1 files changed, 5 insertions, 5 deletions
diff --git a/Ryujinx.Horizon/Sdk/Sf/Cmif/DomainServiceObjectProcessor.cs b/Ryujinx.Horizon/Sdk/Sf/Cmif/DomainServiceObjectProcessor.cs
index 92d86196..796b8a78 100644
--- a/Ryujinx.Horizon/Sdk/Sf/Cmif/DomainServiceObjectProcessor.cs
+++ b/Ryujinx.Horizon/Sdk/Sf/Cmif/DomainServiceObjectProcessor.cs
@@ -63,7 +63,7 @@ namespace Ryujinx.Horizon.Sdk.Sf.Cmif
return SfResult.InvalidInObjectsCount;
}
- Result result = _domain.ReserveIds(new Span<int>(_reservedObjectIds).Slice(0, OutObjectsCount));
+ Result result = _domain.ReserveIds(new Span<int>(_reservedObjectIds)[..OutObjectsCount]);
if (result.IsFailure)
{
@@ -92,7 +92,7 @@ namespace Ryujinx.Horizon.Sdk.Sf.Cmif
DebugUtil.Assert(outHeaderSize + implOutDataTotalSize + OutObjectsCount * sizeof(int) <= outRawData.Length);
- outRawData = outRawData.Slice(outHeaderSize);
+ outRawData = outRawData[outHeaderSize..];
_outObjectIdsOffset = (response.DataWords.Length * sizeof(uint) - outRawData.Length) + implOutDataTotalSize;
return response;
@@ -107,9 +107,9 @@ namespace Ryujinx.Horizon.Sdk.Sf.Cmif
DebugUtil.Assert(outHeaderSize + implOutDataTotalSize <= outRawData.Length);
- outRawData = outRawData.Slice(outHeaderSize);
+ outRawData = outRawData[outHeaderSize..];
- _domain.UnreserveIds(new Span<int>(_reservedObjectIds).Slice(0, OutObjectsCount));
+ _domain.UnreserveIds(new Span<int>(_reservedObjectIds)[..OutObjectsCount]);
}
public override void SetOutObjects(scoped ref ServiceDispatchContext context, HipcMessageData response, Span<ServiceObjectHolder> outObjects)
@@ -129,7 +129,7 @@ namespace Ryujinx.Horizon.Sdk.Sf.Cmif
_domain.RegisterObject(objectIds[i], outObjects[i]);
}
- Span<int> outObjectIds = MemoryMarshal.Cast<byte, int>(MemoryMarshal.Cast<uint, byte>(response.DataWords).Slice(_outObjectIdsOffset));
+ Span<int> outObjectIds = MemoryMarshal.Cast<byte, int>(MemoryMarshal.Cast<uint, byte>(response.DataWords)[_outObjectIdsOffset..]);
for (int i = 0; i < outObjectsCount; i++)
{