From 2c05bce5626327858ad0f92237d14e44efae1bbb Mon Sep 17 00:00:00 2001 From: David Marcec Date: Tue, 10 Jul 2018 15:09:48 +1000 Subject: [PATCH] Code formatting, TryGetValue --- .../OsHle/Services/Nv/NvHostCtrl/NvHostCtrlIoctl.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Ryujinx.HLE/OsHle/Services/Nv/NvHostCtrl/NvHostCtrlIoctl.cs b/Ryujinx.HLE/OsHle/Services/Nv/NvHostCtrl/NvHostCtrlIoctl.cs index b25ed9a5d5..c241329057 100644 --- a/Ryujinx.HLE/OsHle/Services/Nv/NvHostCtrl/NvHostCtrlIoctl.cs +++ b/Ryujinx.HLE/OsHle/Services/Nv/NvHostCtrl/NvHostCtrlIoctl.cs @@ -9,14 +9,17 @@ namespace Ryujinx.HLE.OsHle.Services.Nv.NvHostCtrl class NvHostCtrlIoctl { private static ConcurrentDictionary UserCtxs; + private static bool IsProductionMode = true; static NvHostCtrlIoctl() { UserCtxs = new ConcurrentDictionary(); - if(Set.NxSettings.Settings.ContainsKey("nv!rmos_set_production_mode")) + + Set.NxSettings.Settings.TryGetValue("", out object ProductionModeSetting); + if (ProductionModeSetting != null) { - IsProductionMode = Set.NxSettings.Settings["nv!rmos_set_production_mode"].ToString() != "0"; // Default value is "" + IsProductionMode = ProductionModeSetting.ToString() != "0"; // Default value is "" } } @@ -87,8 +90,10 @@ namespace Ryujinx.HLE.OsHle.Services.Nv.NvHostCtrl Context.Memory.WriteByte(OutputPosition + 0x82, (byte)'0'); Context.Ns.Log.PrintStub(LogClass.ServiceNv, "Stubbed."); + return NvResult.Success; } + return NvResult.NotAvailableInProduction; }