aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/HOS/Services/Caps/IScreenShotApplicationService.cs
diff options
context:
space:
mode:
authorMary <me@thog.eu>2021-04-24 12:16:01 +0200
committerGitHub <noreply@github.com>2021-04-24 12:16:01 +0200
commit305f06eb71a7832e6b0081a67015b66ced8a23cd (patch)
tree98bcb3ed465332a04af449cb5c74bdca7855a141 /Ryujinx.HLE/HOS/Services/Caps/IScreenShotApplicationService.cs
parentc46f6879ff9171a1e024965618242e8bad373b6b (diff)
HLE: Fix integer sign inconcistency accross the codebase (#2222)
* Make all title id instances unsigned * Replace address and size with ulong instead of signed types Long overdue change. Also change some logics here and there to optimize with the new memory manager. * Address Ac_K's comments * Remove uneeded cast all around * Fixes some others misalignment
Diffstat (limited to 'Ryujinx.HLE/HOS/Services/Caps/IScreenShotApplicationService.cs')
-rw-r--r--Ryujinx.HLE/HOS/Services/Caps/IScreenShotApplicationService.cs30
1 files changed, 15 insertions, 15 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Caps/IScreenShotApplicationService.cs b/Ryujinx.HLE/HOS/Services/Caps/IScreenShotApplicationService.cs
index b907ff35..1789122e 100644
--- a/Ryujinx.HLE/HOS/Services/Caps/IScreenShotApplicationService.cs
+++ b/Ryujinx.HLE/HOS/Services/Caps/IScreenShotApplicationService.cs
@@ -26,10 +26,10 @@ namespace Ryujinx.HLE.HOS.Services.Caps
ulong appletResourceUserId = context.RequestData.ReadUInt64();
ulong pidPlaceholder = context.RequestData.ReadUInt64();
- long screenshotDataPosition = context.Request.SendBuff[0].Position;
- long screenshotDataSize = context.Request.SendBuff[0].Size;
+ ulong screenshotDataPosition = context.Request.SendBuff[0].Position;
+ ulong screenshotDataSize = context.Request.SendBuff[0].Size;
- byte[] screenshotData = context.Memory.GetSpan((ulong)screenshotDataPosition, (int)screenshotDataSize, true).ToArray();
+ byte[] screenshotData = context.Memory.GetSpan(screenshotDataPosition, (int)screenshotDataSize, true).ToArray();
ResultCode resultCode = context.Device.System.CaptureManager.SaveScreenShot(screenshotData, appletResourceUserId, context.Device.Application.TitleId, out ApplicationAlbumEntry applicationAlbumEntry);
@@ -49,16 +49,16 @@ namespace Ryujinx.HLE.HOS.Services.Caps
ulong appletResourceUserId = context.RequestData.ReadUInt64();
ulong pidPlaceholder = context.RequestData.ReadUInt64();
- long applicationDataPosition = context.Request.SendBuff[0].Position;
- long applicationDataSize = context.Request.SendBuff[0].Size;
+ ulong applicationDataPosition = context.Request.SendBuff[0].Position;
+ ulong applicationDataSize = context.Request.SendBuff[0].Size;
- long screenshotDataPosition = context.Request.SendBuff[1].Position;
- long screenshotDataSize = context.Request.SendBuff[1].Size;
+ ulong screenshotDataPosition = context.Request.SendBuff[1].Position;
+ 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((ulong)applicationDataPosition, (int)applicationDataSize).ToArray();
+ byte[] applicationData = context.Memory.GetSpan(applicationDataPosition, (int)applicationDataSize).ToArray();
- byte[] screenshotData = context.Memory.GetSpan((ulong)screenshotDataPosition, (int)screenshotDataSize, true).ToArray();
+ byte[] screenshotData = context.Memory.GetSpan(screenshotDataPosition, (int)screenshotDataSize, true).ToArray();
ResultCode resultCode = context.Device.System.CaptureManager.SaveScreenShot(screenshotData, appletResourceUserId, context.Device.Application.TitleId, out ApplicationAlbumEntry applicationAlbumEntry);
@@ -77,16 +77,16 @@ namespace Ryujinx.HLE.HOS.Services.Caps
uint unknown = context.RequestData.ReadUInt32();
ulong appletResourceUserId = context.RequestData.ReadUInt64();
- long userIdListPosition = context.Request.SendBuff[0].Position;
- long userIdListSize = context.Request.SendBuff[0].Size;
+ ulong userIdListPosition = context.Request.SendBuff[0].Position;
+ ulong userIdListSize = context.Request.SendBuff[0].Size;
- long screenshotDataPosition = context.Request.SendBuff[1].Position;
- long screenshotDataSize = context.Request.SendBuff[1].Size;
+ ulong screenshotDataPosition = context.Request.SendBuff[1].Position;
+ ulong screenshotDataSize = context.Request.SendBuff[1].Size;
// TODO: Parse the UserIdList.
- byte[] userIdList = context.Memory.GetSpan((ulong)userIdListPosition, (int)userIdListSize).ToArray();
+ byte[] userIdList = context.Memory.GetSpan(userIdListPosition, (int)userIdListSize).ToArray();
- byte[] screenshotData = context.Memory.GetSpan((ulong)screenshotDataPosition, (int)screenshotDataSize, true).ToArray();
+ byte[] screenshotData = context.Memory.GetSpan(screenshotDataPosition, (int)screenshotDataSize, true).ToArray();
ResultCode resultCode = context.Device.System.CaptureManager.SaveScreenShot(screenshotData, appletResourceUserId, context.Device.Application.TitleId, out ApplicationAlbumEntry applicationAlbumEntry);