diff --git a/BizHawk.Client.EmuHawk/config/GB/DGBPrefs.cs b/BizHawk.Client.EmuHawk/config/GB/DGBPrefs.cs index ef6288bb63..828d1dc5b4 100644 --- a/BizHawk.Client.EmuHawk/config/GB/DGBPrefs.cs +++ b/BizHawk.Client.EmuHawk/config/GB/DGBPrefs.cs @@ -37,6 +37,14 @@ namespace BizHawk.Client.EmuHawk.config.GB ss = new GambatteLink.GambatteLinkSyncSettings(ssl, ssr); } + private bool SyncSettingsChanged + { + get + { + return gbPrefControl1.SyncSettingsChanged || gbPrefControl2.SyncSettingsChanged; + } + } + public static void DoDGBPrefsDialog(IWin32Window owner) { var s = (GambatteLink.GambatteLinkSettings)Global.Emulator.GetSettings(); @@ -54,7 +62,8 @@ namespace BizHawk.Client.EmuHawk.config.GB { dlg.GetSettings(out s, out ss); Global.Emulator.PutSettings(s); - GlobalWin.MainForm.PutCoreSyncSettings(ss); + if (dlg.SyncSettingsChanged) + GlobalWin.MainForm.PutCoreSyncSettings(ss); } } } diff --git a/BizHawk.Client.EmuHawk/config/GB/GBPrefControl.Designer.cs b/BizHawk.Client.EmuHawk/config/GB/GBPrefControl.Designer.cs index d197ef581f..4ec1be52b3 100644 --- a/BizHawk.Client.EmuHawk/config/GB/GBPrefControl.Designer.cs +++ b/BizHawk.Client.EmuHawk/config/GB/GBPrefControl.Designer.cs @@ -44,6 +44,7 @@ this.propertyGrid1.Size = new System.Drawing.Size(318, 276); this.propertyGrid1.TabIndex = 0; this.propertyGrid1.ToolbarVisible = false; + this.propertyGrid1.PropertyValueChanged += new System.Windows.Forms.PropertyValueChangedEventHandler(this.propertyGrid1_PropertyValueChanged); // // buttonDefaults // diff --git a/BizHawk.Client.EmuHawk/config/GB/GBPrefControl.cs b/BizHawk.Client.EmuHawk/config/GB/GBPrefControl.cs index 491b1a0f99..70dd9f601e 100644 --- a/BizHawk.Client.EmuHawk/config/GB/GBPrefControl.cs +++ b/BizHawk.Client.EmuHawk/config/GB/GBPrefControl.cs @@ -21,6 +21,8 @@ namespace BizHawk.Client.EmuHawk.config.GB [Browsable(false)] public bool ColorGameBoy { get; set; } + [Browsable(false)] + public bool SyncSettingsChanged { get; private set; } Gameboy.GambatteSettings s; Gameboy.GambatteSyncSettings ss; @@ -52,6 +54,9 @@ namespace BizHawk.Client.EmuHawk.config.GB ColorChooserForm.DoColorChooserFormDialog(this.ParentForm, s); } - + private void propertyGrid1_PropertyValueChanged(object s, PropertyValueChangedEventArgs e) + { + SyncSettingsChanged = true; + } } } diff --git a/BizHawk.Client.EmuHawk/config/GB/GBPrefs.cs b/BizHawk.Client.EmuHawk/config/GB/GBPrefs.cs index 8f11b38ea9..faf956fc60 100644 --- a/BizHawk.Client.EmuHawk/config/GB/GBPrefs.cs +++ b/BizHawk.Client.EmuHawk/config/GB/GBPrefs.cs @@ -31,7 +31,8 @@ namespace BizHawk.Client.EmuHawk.config.GB { dlg.gbPrefControl1.GetSettings(out s, out ss); Global.Emulator.PutSettings(s); - GlobalWin.MainForm.PutCoreSyncSettings(ss); + if (dlg.gbPrefControl1.SyncSettingsChanged) + GlobalWin.MainForm.PutCoreSyncSettings(ss); } } }