diff options
Diffstat (limited to 'src/Ryujinx.HLE/HOS/Services/Caps/IScreenShotApplicationService.cs')
-rw-r--r-- | src/Ryujinx.HLE/HOS/Services/Caps/IScreenShotApplicationService.cs | 37 |
1 files changed, 22 insertions, 15 deletions
diff --git a/src/Ryujinx.HLE/HOS/Services/Caps/IScreenShotApplicationService.cs b/src/Ryujinx.HLE/HOS/Services/Caps/IScreenShotApplicationService.cs index a3501286..fb62b710 100644 --- a/src/Ryujinx.HLE/HOS/Services/Caps/IScreenShotApplicationService.cs +++ b/src/Ryujinx.HLE/HOS/Services/Caps/IScreenShotApplicationService.cs @@ -20,14 +20,18 @@ namespace Ryujinx.HLE.HOS.Services.Caps public ResultCode SaveScreenShotEx0(ServiceCtx context) { // TODO: Use the ScreenShotAttribute. +#pragma warning disable IDE0059 // Remove unnecessary value assignment ScreenShotAttribute screenShotAttribute = context.RequestData.ReadStruct<ScreenShotAttribute>(); - uint unknown = context.RequestData.ReadUInt32(); + uint unknown = context.RequestData.ReadUInt32(); +#pragma warning restore IDE0059 ulong appletResourceUserId = context.RequestData.ReadUInt64(); - ulong pidPlaceholder = context.RequestData.ReadUInt64(); +#pragma warning disable IDE0059 // Remove unnecessary value assignment + ulong pidPlaceholder = context.RequestData.ReadUInt64(); +#pragma warning restore IDE0059 ulong screenshotDataPosition = context.Request.SendBuff[0].Position; - ulong screenshotDataSize = context.Request.SendBuff[0].Size; + ulong screenshotDataSize = context.Request.SendBuff[0].Size; byte[] screenshotData = context.Memory.GetSpan(screenshotDataPosition, (int)screenshotDataSize, true).ToArray(); @@ -43,20 +47,22 @@ namespace Ryujinx.HLE.HOS.Services.Caps public ResultCode SaveScreenShotEx1(ServiceCtx context) { // TODO: Use the ScreenShotAttribute. - ScreenShotAttribute screenShotAttribute = context.RequestData.ReadStruct<ScreenShotAttribute>(); + _ = context.RequestData.ReadStruct<ScreenShotAttribute>(); - uint unknown = context.RequestData.ReadUInt32(); + _ = context.RequestData.ReadUInt32(); ulong appletResourceUserId = context.RequestData.ReadUInt64(); - ulong pidPlaceholder = context.RequestData.ReadUInt64(); + + _ = context.RequestData.ReadUInt64(); ulong applicationDataPosition = context.Request.SendBuff[0].Position; - ulong applicationDataSize = context.Request.SendBuff[0].Size; + ulong applicationDataSize = context.Request.SendBuff[0].Size; ulong screenshotDataPosition = context.Request.SendBuff[1].Position; - ulong screenshotDataSize = context.Request.SendBuff[1].Size; + ulong screenshotDataSize = context.Request.SendBuff[1].Size; + // TODO: Parse the application data: At 0x00 it's UserData (Size of 0x400), at 0x404 it's a uint UserDataSize (Always empty for now). - byte[] applicationData = context.Memory.GetSpan(applicationDataPosition, (int)applicationDataSize).ToArray(); + _ = context.Memory.GetSpan(applicationDataPosition, (int)applicationDataSize).ToArray(); byte[] screenshotData = context.Memory.GetSpan(screenshotDataPosition, (int)screenshotDataSize, true).ToArray(); @@ -72,19 +78,20 @@ namespace Ryujinx.HLE.HOS.Services.Caps public ResultCode SaveScreenShotEx2(ServiceCtx context) { // TODO: Use the ScreenShotAttribute. - ScreenShotAttribute screenShotAttribute = context.RequestData.ReadStruct<ScreenShotAttribute>(); + _ = context.RequestData.ReadStruct<ScreenShotAttribute>(); - uint unknown = context.RequestData.ReadUInt32(); + _ = context.RequestData.ReadUInt32(); ulong appletResourceUserId = context.RequestData.ReadUInt64(); ulong userIdListPosition = context.Request.SendBuff[0].Position; - ulong userIdListSize = context.Request.SendBuff[0].Size; + ulong userIdListSize = context.Request.SendBuff[0].Size; ulong screenshotDataPosition = context.Request.SendBuff[1].Position; - ulong screenshotDataSize = context.Request.SendBuff[1].Size; + ulong screenshotDataSize = context.Request.SendBuff[1].Size; + // TODO: Parse the UserIdList. - byte[] userIdList = context.Memory.GetSpan(userIdListPosition, (int)userIdListSize).ToArray(); + _ = context.Memory.GetSpan(userIdListPosition, (int)userIdListSize).ToArray(); byte[] screenshotData = context.Memory.GetSpan(screenshotDataPosition, (int)screenshotDataSize, true).ToArray(); @@ -95,4 +102,4 @@ namespace Ryujinx.HLE.HOS.Services.Caps return resultCode; } } -}
\ No newline at end of file +} |