This commit is contained in:
Starlet 2018-06-30 16:23:27 -04:00
parent e913d56fdc
commit fd25a3f0b7
3 changed files with 34 additions and 8 deletions

View file

@ -27,7 +27,7 @@ namespace Ryujinx.HLE.OsHle.Services.Acc
public long GetUserCount(ServiceCtx Context) public long GetUserCount(ServiceCtx Context)
{ {
Context.ResponseData.Write(0); Context.ResponseData.Write(1);
Context.Ns.Log.PrintStub(LogClass.ServiceAcc, "Stubbed."); Context.Ns.Log.PrintStub(LogClass.ServiceAcc, "Stubbed.");

View file

@ -30,7 +30,7 @@ namespace Ryujinx.HLE.OsHle.Services.Acc
{ {
Context.Ns.Log.PrintStub(LogClass.ServiceAcc, "Stubbed."); Context.Ns.Log.PrintStub(LogClass.ServiceAcc, "Stubbed.");
Context.ResponseData.Write(0xcafeL); Context.ResponseData.Write(1L);
return 0; return 0;
} }

View file

@ -1,5 +1,6 @@
using Ryujinx.HLE.Logging; using Ryujinx.HLE.Logging;
using Ryujinx.HLE.OsHle.Ipc; using Ryujinx.HLE.OsHle.Ipc;
using System;
using System.Collections.Generic; using System.Collections.Generic;
namespace Ryujinx.HLE.OsHle.Services.Acc namespace Ryujinx.HLE.OsHle.Services.Acc
@ -22,15 +23,40 @@ namespace Ryujinx.HLE.OsHle.Services.Acc
{ {
Context.Ns.Log.PrintStub(LogClass.ServiceAcc, "Stubbed."); Context.Ns.Log.PrintStub(LogClass.ServiceAcc, "Stubbed.");
//UserID
Context.ResponseData.Write(1L);
//Padding?
Context.ResponseData.Write(0);
Context.ResponseData.Write(0);
//Timestamp
Context.ResponseData.Write(0L); Context.ResponseData.Write(0L);
Context.ResponseData.Write(0L);
Context.ResponseData.Write(0L); //Username
Context.ResponseData.Write(0L); Context.ResponseData.Write(GetUsernameBytes("Ryujinx"));
Context.ResponseData.Write(0L);
Context.ResponseData.Write(0L);
Context.ResponseData.Write(0L);
return 0; return 0;
} }
private byte[] GetUsernameBytes(string Username)
{
char[] CharArr = Username.ToCharArray();
byte[] ByteArr = new byte[0x20];
for (int Index = 0; Index < ByteArr.Length; Index++)
{
if (Index > CharArr.Length)
{
ByteArr[Index] = 0x0;
}
else
{
ByteArr[Index] = Convert.ToByte(CharArr[Index]);
}
}
return ByteArr;
}
} }
} }