aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMary <me@thog.eu>2020-07-05 02:58:11 +0200
committerGitHub <noreply@github.com>2020-07-05 10:58:11 +1000
commit43b78ae157eed5c9436dc19a6d498655891202d8 (patch)
treefbbacbaf86c7501b7f746a69b85df4dec3f1304c
parent686eceb9f6a7c5ad64a23d6288708f20512a8b49 (diff)
prepo: Update implementation for 10.x changes (#1361)
* prepo: Update implementation for 10.x changes On 10.x, Nintendo changed yet another time the prepo SaveReport & SaveReportWithUser command ids. This PR add support for command 10104 & 10105 and update naming of the old variants to match switchbrew. * Fix misalign and remove a ToString * Address jD's comment
-rw-r--r--Ryujinx.HLE/HOS/Services/Prepo/IPrepoService.cs28
1 files changed, 8 insertions, 20 deletions
diff --git a/Ryujinx.HLE/HOS/Services/Prepo/IPrepoService.cs b/Ryujinx.HLE/HOS/Services/Prepo/IPrepoService.cs
index 966e4596..15ef357f 100644
--- a/Ryujinx.HLE/HOS/Services/Prepo/IPrepoService.cs
+++ b/Ryujinx.HLE/HOS/Services/Prepo/IPrepoService.cs
@@ -17,22 +17,8 @@ namespace Ryujinx.HLE.HOS.Services.Prepo
public IPrepoService(ServiceCtx context) { }
[Command(10100)] // 1.0.0-5.1.0
- // SaveReport(u64, pid, buffer<u8, 9>, buffer<bytes, 5>)
- public ResultCode SaveReportOld(ServiceCtx context)
- {
- // We don't care about the differences since we don't use the play report.
- return ProcessReport(context, withUserID: false);
- }
-
- [Command(10101)] // 1.0.0-5.1.0
- // SaveReportWithUserOld(nn::account::Uid, u64, pid, buffer<u8, 9>, buffer<bytes, 5>)
- public ResultCode SaveReportWithUserOld(ServiceCtx context)
- {
- // We don't care about the differences since we don't use the play report.
- return ProcessReport(context, withUserID: true);
- }
-
- [Command(10102)] // 6.0.0+
+ [Command(10102)] // 6.0.0-9.2.0
+ [Command(10104)] // 10.0.0+
// SaveReport(u64, pid, buffer<u8, 9>, buffer<bytes, 5>)
public ResultCode SaveReport(ServiceCtx context)
{
@@ -40,7 +26,9 @@ namespace Ryujinx.HLE.HOS.Services.Prepo
return ProcessReport(context, withUserID: false);
}
- [Command(10103)] // 6.0.0+
+ [Command(10101)] // 1.0.0-5.1.0
+ [Command(10103)] // 6.0.0-9.2.0
+ [Command(10105)] // 10.0.0+
// SaveReportWithUser(nn::account::Uid, u64, pid, buffer<u8, 9>, buffer<bytes, 5>)
public ResultCode SaveReportWithUser(ServiceCtx context)
{
@@ -71,8 +59,8 @@ namespace Ryujinx.HLE.HOS.Services.Prepo
private ResultCode ProcessReport(ServiceCtx context, bool withUserID)
{
- UserId userId = withUserID ? context.RequestData.ReadStruct<UserId>() : new UserId();
- string gameRoom = StringUtils.ReadUtf8String(context);
+ UserId userId = withUserID ? context.RequestData.ReadStruct<UserId>() : new UserId();
+ string gameRoom = StringUtils.ReadUtf8String(context);
if (withUserID)
{
@@ -114,7 +102,7 @@ namespace Ryujinx.HLE.HOS.Services.Prepo
if (!userId.IsNull)
{
- builder.AppendLine($" UserId: {userId.ToString()}");
+ builder.AppendLine($" UserId: {userId}");
}
builder.AppendLine($" Room: {room}");