From 5a8c58de3c7d9a5fd48574e6a23e135b1e521554 Mon Sep 17 00:00:00 2001 From: nattthebear Date: Fri, 8 Jan 2021 08:52:24 -0500 Subject: [PATCH] Look mom, I'm using the new C# --- .../Consoles/NEC/PCE/HyperNyma.cs | 18 +++--- .../Consoles/NEC/PCE/TurboNyma.cs | 32 +++++----- .../Consoles/NEC/PCFX/Tst.cs | 32 +++++----- .../Consoles/Nintendo/Faust/Faust.cs | 36 +++++------ .../Consoles/SNK/NeoGeoPort.cs | 2 +- .../Consoles/Sega/Saturn/Saturnus.cs | 60 +++++++++---------- .../Waterbox/NymaCore.Settings.cs | 2 +- 7 files changed, 91 insertions(+), 91 deletions(-) diff --git a/src/BizHawk.Emulation.Cores/Consoles/NEC/PCE/HyperNyma.cs b/src/BizHawk.Emulation.Cores/Consoles/NEC/PCE/HyperNyma.cs index f857f88440..12c3d70442 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/NEC/PCE/HyperNyma.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/NEC/PCE/HyperNyma.cs @@ -37,16 +37,16 @@ namespace BizHawk.Emulation.Cores.Consoles.NEC.PCE protected override IDictionary SettingOverrides { get; } = new Dictionary { - { "pce_fast.mouse_sensitivity", new SettingOverride { Hide = true } }, - { "pce_fast.disable_softreset", new SettingOverride { Hide = true } }, - { "pce_fast.cdbios", new SettingOverride { Hide = true } }, - { "nyma.rtcinitialtime", new SettingOverride { Hide = true } }, - { "nyma.rtcrealtime", new SettingOverride { Hide = true } }, - { "pce_fast.slstart", new SettingOverride { NonSync = true, NoRestart = true } }, - { "pce_fast.slend", new SettingOverride { NonSync = true, NoRestart = true } }, + { "pce_fast.mouse_sensitivity", new() { Hide = true } }, + { "pce_fast.disable_softreset", new() { Hide = true } }, + { "pce_fast.cdbios", new() { Hide = true } }, + { "nyma.rtcinitialtime", new() { Hide = true } }, + { "nyma.rtcrealtime", new() { Hide = true } }, + { "pce_fast.slstart", new() { NonSync = true, NoRestart = true } }, + { "pce_fast.slend", new() { NonSync = true, NoRestart = true } }, - { "pce_fast.correct_aspect", new SettingOverride { NonSync = true } }, - { "pce_fast.nospritelimit", new SettingOverride { NonSync = true } }, + { "pce_fast.correct_aspect", new() { NonSync = true } }, + { "pce_fast.nospritelimit", new() { NonSync = true } }, }; // pce always has two layers, sgx always has 4, and mednafen knows this diff --git a/src/BizHawk.Emulation.Cores/Consoles/NEC/PCE/TurboNyma.cs b/src/BizHawk.Emulation.Cores/Consoles/NEC/PCE/TurboNyma.cs index 1e9fe5ba7c..ba8014f04c 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/NEC/PCE/TurboNyma.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/NEC/PCE/TurboNyma.cs @@ -49,29 +49,29 @@ namespace BizHawk.Emulation.Cores.Consoles.NEC.PCE protected override IDictionary SettingOverrides { get; } = new Dictionary { // handled by hawk - { "pce.cdbios", new SettingOverride { Hide = true } }, - { "pce.gecdbios", new SettingOverride { Hide = true } }, + { "pce.cdbios", new() { Hide = true } }, + { "pce.gecdbios", new() { Hide = true } }, // so fringe i don't want people bothering me about it - { "pce.resamp_rate_error", new SettingOverride { Hide = true } }, - { "pce.vramsize", new SettingOverride { Hide = true } }, + { "pce.resamp_rate_error", new() { Hide = true } }, + { "pce.vramsize", new() { Hide = true } }, // match hawk behavior on BRAM, instead of giving every game BRAM - { "pce.disable_bram_hucard", new SettingOverride { Hide = true, Default = "1" } }, + { "pce.disable_bram_hucard", new() { Hide = true, Default = "1" } }, // nyma settings that don't apply here // TODO: not quite happy with how this works out - { "nyma.rtcinitialtime", new SettingOverride { Hide = true } }, - { "nyma.rtcrealtime", new SettingOverride { Hide = true } }, + { "nyma.rtcinitialtime", new() { Hide = true } }, + { "nyma.rtcrealtime", new() { Hide = true } }, // these can be changed dynamically - { "pce.slstart", new SettingOverride { NonSync = true, NoRestart = true } }, - { "pce.slend", new SettingOverride { NonSync = true, NoRestart = true } }, + { "pce.slstart", new() { NonSync = true, NoRestart = true } }, + { "pce.slend", new() { NonSync = true, NoRestart = true } }, - { "pce.h_overscan", new SettingOverride { NonSync = true } }, - { "pce.mouse_sensitivity", new SettingOverride { Hide = true } }, - { "pce.nospritelimit", new SettingOverride { NonSync = true } }, - { "pce.resamp_quality", new SettingOverride { NonSync = true } }, + { "pce.h_overscan", new() { NonSync = true } }, + { "pce.mouse_sensitivity", new() { Hide = true } }, + { "pce.nospritelimit", new() { NonSync = true } }, + { "pce.resamp_quality", new() { NonSync = true } }, - { "pce.cdpsgvolume", new SettingOverride { NonSync = true, NoRestart = true } }, - { "pce.cddavolume", new SettingOverride { NonSync = true, NoRestart = true } }, - { "pce.adpcmvolume", new SettingOverride { NonSync = true, NoRestart = true } }, + { "pce.cdpsgvolume", new() { NonSync = true, NoRestart = true } }, + { "pce.cddavolume", new() { NonSync = true, NoRestart = true } }, + { "pce.adpcmvolume", new() { NonSync = true, NoRestart = true } }, }; protected override HashSet ComputeHiddenPorts() diff --git a/src/BizHawk.Emulation.Cores/Consoles/NEC/PCFX/Tst.cs b/src/BizHawk.Emulation.Cores/Consoles/NEC/PCFX/Tst.cs index 84fed60b47..23d032cad5 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/NEC/PCFX/Tst.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/NEC/PCFX/Tst.cs @@ -25,26 +25,26 @@ namespace BizHawk.Emulation.Cores.Consoles.NEC.PCFX protected override IDictionary SettingOverrides { get; } = new Dictionary { - { "pcfx.input.port1.multitap", new SettingOverride { Hide = true } }, - { "pcfx.input.port2.multitap", new SettingOverride { Hide = true } }, - { "pcfx.bios", new SettingOverride { Hide = true } }, - { "pcfx.fxscsi", new SettingOverride { Hide = true } }, - { "nyma.rtcinitialtime", new SettingOverride { Hide = true } }, - { "nyma.rtcrealtime", new SettingOverride { Hide = true } }, + { "pcfx.input.port1.multitap", new() { Hide = true } }, + { "pcfx.input.port2.multitap", new() { Hide = true } }, + { "pcfx.bios", new() { Hide = true } }, + { "pcfx.fxscsi", new() { Hide = true } }, + { "nyma.rtcinitialtime", new() { Hide = true } }, + { "nyma.rtcrealtime", new() { Hide = true } }, - { "pcfx.slstart", new SettingOverride { NonSync = true, NoRestart = true } }, - { "pcfx.slend", new SettingOverride { NonSync = true, NoRestart = true } }, + { "pcfx.slstart", new() { NonSync = true, NoRestart = true } }, + { "pcfx.slend", new() { NonSync = true, NoRestart = true } }, - { "pcfx.mouse_sensitivity", new SettingOverride { Hide = true } }, - { "pcfx.nospritelimit", new SettingOverride { NonSync = true } }, - { "pcfx.high_dotclock_width", new SettingOverride { NonSync = true } }, - { "pcfx.rainbow.chromaip", new SettingOverride { NonSync = true } }, + { "pcfx.mouse_sensitivity", new() { Hide = true } }, + { "pcfx.nospritelimit", new() { NonSync = true } }, + { "pcfx.high_dotclock_width", new() { NonSync = true } }, + { "pcfx.rainbow.chromaip", new() { NonSync = true } }, - { "pcfx.adpcm.suppress_channel_reset_clicks", new SettingOverride { NonSync = true } }, - { "pcfx.adpcm.emulate_buggy_codec", new SettingOverride { NonSync = true } }, + { "pcfx.adpcm.suppress_channel_reset_clicks", new() { NonSync = true } }, + { "pcfx.adpcm.emulate_buggy_codec", new() { NonSync = true } }, - { "pcfx.resamp_quality", new SettingOverride { NonSync = true } }, - { "pcfx.resamp_rate_error", new SettingOverride { Hide = true } }, + { "pcfx.resamp_quality", new() { NonSync = true } }, + { "pcfx.resamp_rate_error", new() { Hide = true } }, }; protected override HashSet ComputeHiddenPorts() diff --git a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Faust/Faust.cs b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Faust/Faust.cs index 77c0be616c..e52e00534c 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Faust/Faust.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Nintendo/Faust/Faust.cs @@ -14,7 +14,7 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.Faust { if (deterministic) // force ST renderer - SettingOverrides.Add("snes_faust.renderer", new SettingOverride { Hide = true, Default = "0" }); + SettingOverrides.Add("snes_faust.renderer", new() { Hide = true, Default = "0" }); DoInit(game, rom, null, "faust.wbx", extension, deterministic); } @@ -37,24 +37,24 @@ namespace BizHawk.Emulation.Cores.Consoles.Nintendo.Faust protected override IDictionary SettingOverrides { get; } = new Dictionary { - { "snes_faust.affinity.ppu", new SettingOverride { Hide = true } }, - { "snes_faust.affinity.msu1.audio", new SettingOverride { Hide = true } }, - { "snes_faust.affinity.msu1.data", new SettingOverride { Hide = true } }, - { "snes_faust.frame_begin_vblank", new SettingOverride { Hide = true } }, - { "snes_faust.msu1.resamp_quality", new SettingOverride { Hide = true } }, - { "snes_faust.spex", new SettingOverride { Hide = true } }, - { "snes_faust.spex.sound", new SettingOverride { Hide = true } }, - { "nyma.rtcinitialtime", new SettingOverride { Hide = true } }, - { "nyma.rtcrealtime", new SettingOverride { Hide = true } }, + { "snes_faust.affinity.ppu", new() { Hide = true } }, + { "snes_faust.affinity.msu1.audio", new() { Hide = true } }, + { "snes_faust.affinity.msu1.data", new() { Hide = true } }, + { "snes_faust.frame_begin_vblank", new() { Hide = true } }, + { "snes_faust.msu1.resamp_quality", new() { Hide = true } }, + { "snes_faust.spex", new() { Hide = true } }, + { "snes_faust.spex.sound", new() { Hide = true } }, + { "nyma.rtcinitialtime", new() { Hide = true } }, + { "nyma.rtcrealtime", new() { Hide = true } }, - { "snes_faust.resamp_rate_error", new SettingOverride { Hide = true } }, - { "snes_faust.resamp_quality", new SettingOverride { NonSync = true } }, - { "snes_faust.correct_aspect", new SettingOverride { NonSync = true } }, - { "snes_faust.slstart", new SettingOverride { NonSync = true } }, - { "snes_faust.slend", new SettingOverride { NonSync = true } }, - { "snes_faust.slstartp", new SettingOverride { NonSync = true } }, - { "snes_faust.slendp", new SettingOverride { NonSync = true } }, - { "snes_faust.h_filter", new SettingOverride { NonSync = true } }, + { "snes_faust.resamp_rate_error", new() { Hide = true } }, + { "snes_faust.resamp_quality", new() { NonSync = true } }, + { "snes_faust.correct_aspect", new() { NonSync = true } }, + { "snes_faust.slstart", new() { NonSync = true } }, + { "snes_faust.slend", new() { NonSync = true } }, + { "snes_faust.slstartp", new() { NonSync = true } }, + { "snes_faust.slendp", new() { NonSync = true } }, + { "snes_faust.h_filter", new() { NonSync = true } }, }; } } diff --git a/src/BizHawk.Emulation.Cores/Consoles/SNK/NeoGeoPort.cs b/src/BizHawk.Emulation.Cores/Consoles/SNK/NeoGeoPort.cs index d2295d811d..a9ee23091d 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/SNK/NeoGeoPort.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/SNK/NeoGeoPort.cs @@ -50,7 +50,7 @@ namespace BizHawk.Emulation.Cores.Consoles.SNK protected override IDictionary SettingOverrides { get; } = new Dictionary { - { "nyma.constantfb", new SettingOverride { Hide = true } }, // TODO: Couldn't we just autodetect this whenever lcm == max == nominal? + { "nyma.constantfb", new() { Hide = true } }, // TODO: Couldn't we just autodetect this whenever lcm == max == nominal? }; } } diff --git a/src/BizHawk.Emulation.Cores/Consoles/Sega/Saturn/Saturnus.cs b/src/BizHawk.Emulation.Cores/Consoles/Sega/Saturn/Saturnus.cs index 87e567243b..6f3e56b7c3 100644 --- a/src/BizHawk.Emulation.Cores/Consoles/Sega/Saturn/Saturnus.cs +++ b/src/BizHawk.Emulation.Cores/Consoles/Sega/Saturn/Saturnus.cs @@ -28,39 +28,39 @@ namespace BizHawk.Emulation.Cores.Consoles.Sega.Saturn protected override IDictionary SettingOverrides { get; } = new Dictionary { - { "ss.bios_jp", new SettingOverride { Hide = true , Default = "$J" } }, // FIRMWARE: - { "ss.bios_na_eu", new SettingOverride { Hide = true , Default = "$U" } }, // FIRMWARE: - { "ss.cart.kof95_path", new SettingOverride { Hide = true , Default = "$KOF" } }, // FIRMWARE: - { "ss.cart.ultraman_path", new SettingOverride { Hide = true , Default = "$ULTRA" } }, // FIRMWARE: - { "ss.cart.satar4mp_path", new SettingOverride { Hide = true , Default = "$SATAR" } }, // FIRMWARE: - { "ss.affinity.vdp2", new SettingOverride { Hide = true } }, - { "ss.dbg_exe_cdpath", new SettingOverride { Hide = true } }, - { "ss.dbg_exe_cem", new SettingOverride { Hide = true } }, - { "ss.dbg_exe_hh", new SettingOverride { Hide = true } }, + { "ss.bios_jp", new() { Hide = true , Default = "$J" } }, // FIRMWARE: + { "ss.bios_na_eu", new() { Hide = true , Default = "$U" } }, // FIRMWARE: + { "ss.cart.kof95_path", new() { Hide = true , Default = "$KOF" } }, // FIRMWARE: + { "ss.cart.ultraman_path", new() { Hide = true , Default = "$ULTRA" } }, // FIRMWARE: + { "ss.cart.satar4mp_path", new() { Hide = true , Default = "$SATAR" } }, // FIRMWARE: + { "ss.affinity.vdp2", new() { Hide = true } }, + { "ss.dbg_exe_cdpath", new() { Hide = true } }, + { "ss.dbg_exe_cem", new() { Hide = true } }, + { "ss.dbg_exe_hh", new() { Hide = true } }, - { "ss.scsp.resamp_quality", new SettingOverride { NonSync = true } }, // Don't set NoRestart = true for this - { "ss.input.mouse_sensitivity", new SettingOverride { Hide = true } }, + { "ss.scsp.resamp_quality", new() { NonSync = true } }, // Don't set NoRestart = true for this + { "ss.input.mouse_sensitivity", new() { Hide = true } }, - { "ss.input.port1.gun_chairs", new SettingOverride { NonSync = true } }, - { "ss.input.port2.gun_chairs", new SettingOverride { NonSync = true } }, - { "ss.input.port3.gun_chairs", new SettingOverride { NonSync = true } }, - { "ss.input.port4.gun_chairs", new SettingOverride { NonSync = true } }, - { "ss.input.port5.gun_chairs", new SettingOverride { NonSync = true } }, - { "ss.input.port6.gun_chairs", new SettingOverride { NonSync = true } }, - { "ss.input.port7.gun_chairs", new SettingOverride { NonSync = true } }, - { "ss.input.port8.gun_chairs", new SettingOverride { NonSync = true } }, - { "ss.input.port9.gun_chairs", new SettingOverride { NonSync = true } }, - { "ss.input.port10.gun_chairs", new SettingOverride { NonSync = true } }, - { "ss.input.port11.gun_chairs", new SettingOverride { NonSync = true } }, - { "ss.input.port12.gun_chairs", new SettingOverride { NonSync = true } }, + { "ss.input.port1.gun_chairs", new() { NonSync = true } }, + { "ss.input.port2.gun_chairs", new() { NonSync = true } }, + { "ss.input.port3.gun_chairs", new() { NonSync = true } }, + { "ss.input.port4.gun_chairs", new() { NonSync = true } }, + { "ss.input.port5.gun_chairs", new() { NonSync = true } }, + { "ss.input.port6.gun_chairs", new() { NonSync = true } }, + { "ss.input.port7.gun_chairs", new() { NonSync = true } }, + { "ss.input.port8.gun_chairs", new() { NonSync = true } }, + { "ss.input.port9.gun_chairs", new() { NonSync = true } }, + { "ss.input.port10.gun_chairs", new() { NonSync = true } }, + { "ss.input.port11.gun_chairs", new() { NonSync = true } }, + { "ss.input.port12.gun_chairs", new() { NonSync = true } }, - { "ss.slstart", new SettingOverride { NonSync = true } }, - { "ss.slend", new SettingOverride { NonSync = true } }, - { "ss.h_overscan", new SettingOverride { NonSync = true } }, - { "ss.h_blend", new SettingOverride { NonSync = true } }, - { "ss.correct_aspect", new SettingOverride { NonSync = true, Default = "0" } }, - { "ss.slstartp", new SettingOverride { NonSync = true } }, - { "ss.slendp", new SettingOverride { NonSync = true } }, + { "ss.slstart", new() { NonSync = true } }, + { "ss.slend", new() { NonSync = true } }, + { "ss.h_overscan", new() { NonSync = true } }, + { "ss.h_blend", new() { NonSync = true } }, + { "ss.correct_aspect", new() { NonSync = true, Default = "0" } }, + { "ss.slstartp", new() { NonSync = true } }, + { "ss.slendp", new() { NonSync = true } }, }; protected override HashSet ComputeHiddenPorts() diff --git a/src/BizHawk.Emulation.Cores/Waterbox/NymaCore.Settings.cs b/src/BizHawk.Emulation.Cores/Waterbox/NymaCore.Settings.cs index 4cf3a55ef6..e834b5007d 100644 --- a/src/BizHawk.Emulation.Cores/Waterbox/NymaCore.Settings.cs +++ b/src/BizHawk.Emulation.Cores/Waterbox/NymaCore.Settings.cs @@ -300,7 +300,7 @@ namespace BizHawk.Emulation.Cores.Waterbox private static readonly IReadOnlyDictionary ExtraOverrides = new Dictionary { - { "nyma.constantfb", new SettingOverride { NonSync = true, NoRestart = true } }, + { "nyma.constantfb", new() { NonSync = true, NoRestart = true } }, }; private static readonly IReadOnlyCollection ExtraSettings = new List