From 6f53ad1af7e67ce508a94aef645837894eb47962 Mon Sep 17 00:00:00 2001 From: alyosha-tas Date: Fri, 27 Dec 2019 17:45:37 -0500 Subject: [PATCH] Fix settings initialization for several other cores --- .../Consoles/Atari/A7800Hawk/A7800Hawk.ISettable.cs | 10 ++++++++++ .../Consoles/GCE/Vectrex/VectrexHawk.ISettable.cs | 10 ++++++++++ .../Consoles/Nintendo/GBHawk/GBHawk.ISettable.cs | 10 ++++++++++ .../Nintendo/GBHawkLink/GBHawkLink.ISettable.cs | 10 ++++++++++ .../Nintendo/GBHawkLink3x/GBHawkLink3x.ISettable.cs | 10 ++++++++++ .../Nintendo/GBHawkLink4x/GBHawkLink4x.ISettable.cs | 9 +++++++++ 6 files changed, 59 insertions(+) diff --git a/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/A7800Hawk.ISettable.cs b/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/A7800Hawk.ISettable.cs index 4d81204e91..88e9a55297 100644 --- a/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/A7800Hawk.ISettable.cs +++ b/BizHawk.Emulation.Cores/Consoles/Atari/A7800Hawk/A7800Hawk.ISettable.cs @@ -40,6 +40,11 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk { return (A7800Settings)MemberwiseClone(); } + + public A7800Settings() + { + SettingsUtil.SetDefaultValues(this); + } } public class A7800SyncSettings @@ -93,6 +98,11 @@ namespace BizHawk.Emulation.Cores.Atari.A7800Hawk return (A7800SyncSettings)MemberwiseClone(); } + public A7800SyncSettings() + { + SettingsUtil.SetDefaultValues(this); + } + public static bool NeedsReboot(A7800SyncSettings x, A7800SyncSettings y) { return !DeepEquality.DeepEquals(x, y); diff --git a/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/VectrexHawk.ISettable.cs b/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/VectrexHawk.ISettable.cs index 28ec3e426b..e2c4883061 100644 --- a/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/VectrexHawk.ISettable.cs +++ b/BizHawk.Emulation.Cores/Consoles/GCE/Vectrex/VectrexHawk.ISettable.cs @@ -43,6 +43,11 @@ namespace BizHawk.Emulation.Cores.Consoles.Vectrex { return (VectrexSettings)MemberwiseClone(); } + + public VectrexSettings() + { + SettingsUtil.SetDefaultValues(this); + } } public class VectrexSyncSettings @@ -96,6 +101,11 @@ namespace BizHawk.Emulation.Cores.Consoles.Vectrex return (VectrexSyncSettings)MemberwiseClone(); } + public VectrexSyncSettings() + { + SettingsUtil.SetDefaultValues(this); + } + public static bool NeedsReboot(VectrexSyncSettings x, VectrexSyncSettings y) { return !DeepEquality.DeepEquals(x, y); diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBHawk.ISettable.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBHawk.ISettable.cs index da4d606465..8f3c67c176 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBHawk.ISettable.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawk/GBHawk.ISettable.cs @@ -54,6 +54,11 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk { return (GBSettings)MemberwiseClone(); } + + public GBSettings() + { + SettingsUtil.SetDefaultValues(this); + } } public class GBSyncSettings @@ -148,6 +153,11 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawk return (GBSyncSettings)MemberwiseClone(); } + public GBSyncSettings() + { + SettingsUtil.SetDefaultValues(this); + } + public static bool NeedsReboot(GBSyncSettings x, GBSyncSettings y) { return !DeepEquality.DeepEquals(x, y); diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink/GBHawkLink.ISettable.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink/GBHawkLink.ISettable.cs index 73046bdbac..49ae9faab8 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink/GBHawkLink.ISettable.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink/GBHawkLink.ISettable.cs @@ -65,6 +65,11 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawkLink { return (GBLinkSettings)MemberwiseClone(); } + + public GBLinkSettings() + { + SettingsUtil.SetDefaultValues(this); + } } public class GBLinkSyncSettings @@ -161,6 +166,11 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawkLink return (GBLinkSyncSettings)MemberwiseClone(); } + public GBLinkSyncSettings() + { + SettingsUtil.SetDefaultValues(this); + } + public static bool NeedsReboot(GBLinkSyncSettings x, GBLinkSyncSettings y) { return !DeepEquality.DeepEquals(x, y); diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink3x/GBHawkLink3x.ISettable.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink3x/GBHawkLink3x.ISettable.cs index 0e959567d2..b04098541f 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink3x/GBHawkLink3x.ISettable.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink3x/GBHawkLink3x.ISettable.cs @@ -71,6 +71,11 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawkLink3x { return (GBLink3xSettings)MemberwiseClone(); } + + public GBLink3xSettings() + { + SettingsUtil.SetDefaultValues(this); + } } public class GBLink3xSyncSettings @@ -205,6 +210,11 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawkLink3x return (GBLink3xSyncSettings)MemberwiseClone(); } + public GBLink3xSyncSettings() + { + SettingsUtil.SetDefaultValues(this); + } + public static bool NeedsReboot(GBLink3xSyncSettings x, GBLink3xSyncSettings y) { return !DeepEquality.DeepEquals(x, y); diff --git a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink4x/GBHawkLink4x.ISettable.cs b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink4x/GBHawkLink4x.ISettable.cs index 0ada335d84..63cddb56e6 100644 --- a/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink4x/GBHawkLink4x.ISettable.cs +++ b/BizHawk.Emulation.Cores/Consoles/Nintendo/GBHawkLink4x/GBHawkLink4x.ISettable.cs @@ -77,6 +77,11 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawkLink4x { return (GBLink4xSettings)MemberwiseClone(); } + + public GBLink4xSettings() + { + SettingsUtil.SetDefaultValues(this); + } } public class GBLink4xSyncSettings @@ -249,6 +254,10 @@ namespace BizHawk.Emulation.Cores.Nintendo.GBHawkLink4x return (GBLink4xSyncSettings)MemberwiseClone(); } + public GBLink4xSyncSettings() + { + SettingsUtil.SetDefaultValues(this); + } public static bool NeedsReboot(GBLink4xSyncSettings x, GBLink4xSyncSettings y) { return !DeepEquality.DeepEquals(x, y);