GetConfig will now check settings only if nv!rmos_set_production_mode is set to "0"
This commit is contained in:
parent
90050c3f84
commit
b12017344a
2 changed files with 19 additions and 1 deletions
|
@ -9,10 +9,15 @@ namespace Ryujinx.HLE.OsHle.Services.Nv.NvHostCtrl
|
|||
class NvHostCtrlIoctl
|
||||
{
|
||||
private static ConcurrentDictionary<Process, NvHostCtrlUserCtx> UserCtxs;
|
||||
private static bool IsProductionMode = true;
|
||||
|
||||
static NvHostCtrlIoctl()
|
||||
{
|
||||
UserCtxs = new ConcurrentDictionary<Process, NvHostCtrlUserCtx>();
|
||||
if(Set.NxSettings.Settings.ContainsKey("nv!rmos_set_production_mode"))
|
||||
{
|
||||
IsProductionMode = Set.NxSettings.Settings["nv!rmos_set_production_mode"].ToString() != "0"; // Default value is ""
|
||||
}
|
||||
}
|
||||
|
||||
public static int ProcessIoctl(ServiceCtx Context, int Cmd)
|
||||
|
@ -71,6 +76,19 @@ namespace Ryujinx.HLE.OsHle.Services.Nv.NvHostCtrl
|
|||
|
||||
private static int GetConfig(ServiceCtx Context)
|
||||
{
|
||||
if (!IsProductionMode)
|
||||
{
|
||||
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);
|
||||
|
||||
Context.Memory.WriteByte(OutputPosition + 0x82, (byte)'0');
|
||||
|
||||
Context.Ns.Log.PrintStub(LogClass.ServiceNv, "Stubbed.");
|
||||
return NvResult.Success;
|
||||
}
|
||||
return NvResult.NotAvailableInProduction;
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ namespace Ryujinx.HLE.OsHle.Services.Nv
|
|||
{
|
||||
static class NvResult
|
||||
{
|
||||
public const int NotAvailableInProduction = 196614,
|
||||
public const int NotAvailableInProduction = 196614;
|
||||
public const int Success = 0;
|
||||
public const int TryAgain = -11;
|
||||
public const int OutOfMemory = -12;
|
||||
|
|
Loading…
Add table
Reference in a new issue