public static void DoGBPrefsDialog(IWin32Window owner) { var s = (Gameboy.GambatteSettings)Global.Emulator.GetSettings(); var ss = (Gameboy.GambatteSyncSettings)Global.Emulator.GetSyncSettings(); using (var dlg = new GBPrefs()) { dlg.gbPrefControl1.PutSettings(s, ss); dlg.gbPrefControl1.ColorGameBoy = ((Gameboy)Global.Emulator).IsCGBMode(); if (dlg.ShowDialog(owner) == DialogResult.OK) { dlg.gbPrefControl1.GetSettings(out s, out ss); Global.Emulator.PutSettings(s); if (dlg.gbPrefControl1.SyncSettingsChanged) GlobalWin.MainForm.PutCoreSyncSettings(ss); } } }
public static void DoGBPrefsDialog(IWin32Window owner) { var s = (Gameboy.GambatteSettings)Global.Emulator.GetSettings(); var ss = (Gameboy.GambatteSyncSettings)Global.Emulator.GetSyncSettings(); using (var dlg = new GBPrefs()) { dlg.gbPrefControl1.PutSettings(s, ss); dlg.gbPrefControl1.ColorGameBoy = ((Gameboy)Global.Emulator).IsCGBMode(); if (dlg.ShowDialog(owner) == DialogResult.OK) { dlg.gbPrefControl1.GetSettings(out s, out ss); Global.Emulator.PutSettings(s); if (dlg.gbPrefControl1.SyncSettingsChanged) { GlobalWin.MainForm.PutCoreSyncSettings(ss); } } } }