Implement OutputAccessLogToSdCard and expose an FS access log option (#700)

* Add OutputAccessLogToSdCard

* Add config options for the FS access log
This commit is contained in:
Alex Barney 2019-06-15 20:31:18 -05:00 committed by Ac_K
parent 5c1bc52409
commit 350a3667f7
9 changed files with 136 additions and 20 deletions

View file

@ -72,5 +72,28 @@ namespace Ryujinx.HLE.Utilities
return Encoding.UTF8.GetString(ms.ToArray());
}
}
public static string ReadUtf8StringSend(ServiceCtx context, int index = 0)
{
long position = context.Request.SendBuff[index].Position;
long size = context.Request.SendBuff[index].Size;
using (MemoryStream ms = new MemoryStream())
{
while (size-- > 0)
{
byte value = context.Memory.ReadByte(position++);
if (value == 0)
{
break;
}
ms.WriteByte(value);
}
return Encoding.UTF8.GetString(ms.ToArray());
}
}
}
}