This commit is contained in:
Starlet 2018-07-19 16:17:04 +00:00 committed by GitHub
commit 85db0233ec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 64 additions and 9 deletions

3
.gitignore vendored
View file

@ -158,3 +158,6 @@ $RECYCLE.BIN/
# Mac desktop service store files
.DS_Store
# VS Launch Settings
launchSettings.json

View file

@ -27,7 +27,7 @@ namespace Ryujinx.HLE.OsHle.Services.Acc
public long GetUserCount(ServiceCtx Context)
{
Context.ResponseData.Write(0);
Context.ResponseData.Write(1);
Context.Ns.Log.PrintStub(LogClass.ServiceAcc, "Stubbed.");
@ -45,6 +45,11 @@ namespace Ryujinx.HLE.OsHle.Services.Acc
public long ListAllUsers(ServiceCtx Context)
{
long Position = Context.Request.RecvListBuff[0].Position;
Context.Memory.WriteInt64(Position, 1L);
Context.Memory.WriteInt64(Position + 8, 0L);
Context.Ns.Log.PrintStub(LogClass.ServiceAcc, "Stubbed.");
return 0;
@ -52,6 +57,11 @@ namespace Ryujinx.HLE.OsHle.Services.Acc
public long ListOpenUsers(ServiceCtx Context)
{
long Position = Context.Request.RecvListBuff[0].Position;
Context.Memory.WriteInt64(Position, 1L);
Context.Memory.WriteInt64(Position + 8, 0L);
Context.Ns.Log.PrintStub(LogClass.ServiceAcc, "Stubbed.");
return 0;

View file

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

View file

@ -1,5 +1,6 @@
using Ryujinx.HLE.Logging;
using Ryujinx.HLE.OsHle.Ipc;
using System;
using System.Collections.Generic;
namespace Ryujinx.HLE.OsHle.Services.Acc
@ -22,15 +23,40 @@ namespace Ryujinx.HLE.OsHle.Services.Acc
{
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);
Context.ResponseData.Write(0L);
Context.ResponseData.Write(0L);
Context.ResponseData.Write(0L);
//Username
Context.ResponseData.Write(GetUsernameBytes("Ryujinx"));
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 - 1)
{
ByteArr[Index] = 0x0;
}
else
{
ByteArr[Index] = Convert.ToByte(CharArr[Index]);
}
}
return ByteArr;
}
}
}

View file

@ -1,3 +1,4 @@
using Ryujinx.HLE.Logging;
using Ryujinx.HLE.OsHle.Ipc;
using System.Collections.Generic;
@ -13,8 +14,23 @@ namespace Ryujinx.HLE.OsHle.Services.Friend
{
m_Commands = new Dictionary<int, ServiceProcessRequest>()
{
//...
{ 10601, DeclareCloseOnlinePlaySession },
{ 10610, UpdateUserPresence }
};
}
public long DeclareCloseOnlinePlaySession(ServiceCtx Context)
{
Context.Ns.Log.PrintStub(LogClass.ServiceFriend, "Stubbed.");
return 0;
}
public long UpdateUserPresence(ServiceCtx Context)
{
Context.Ns.Log.PrintStub(LogClass.ServiceFriend, "Stubbed.");
return 0;
}
}
}