This commit is contained in:
Starlet 2018-07-12 01:14:26 +00:00 committed by GitHub
commit 0de2fe8998
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 3 deletions

View file

@ -0,0 +1,14 @@
using System.Runtime.InteropServices;
namespace Ryujinx.HLE.OsHle.Services.Nv.NvHostCtrl
{
struct NvHostCtrlGetConfig
{
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 0x41)]
public string DomainString;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 0x41)]
public string ParameterString;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 0x101)]
public string ConfigurationString;
}
}

View file

@ -74,10 +74,18 @@ namespace Ryujinx.HLE.OsHle.Services.Nv.NvHostCtrl
long InputPosition = Context.Request.GetBufferType0x21().Position;
long OutputPosition = Context.Request.GetBufferType0x22().Position;
string Nv = AMemoryHelper.ReadAsciiString(Context.Memory, InputPosition + 0, 0x41);
string Name = AMemoryHelper.ReadAsciiString(Context.Memory, InputPosition + 0x41, 0x41);
NvHostCtrlGetConfig Args = AMemoryHelper.Read<NvHostCtrlGetConfig>(Context.Memory, InputPosition);
Context.Memory.WriteByte(OutputPosition + 0x82, 0);
if (Args.DomainString == "nv")
{
Args.ConfigurationString = "0";
}
else
{
Context.Ns.Log.PrintWarning(LogClass.ServiceNv, $"Unimplemented domain string! {Args.DomainString}");
}
AMemoryHelper.Write(Context.Memory, OutputPosition, Args);
Context.Ns.Log.PrintStub(LogClass.ServiceNv, "Stubbed.");