2017-05-31 13:52:55 +00:00
|
|
|
|
using System.Windows.Forms;
|
|
|
|
|
|
2014-05-12 17:24:43 +00:00
|
|
|
|
using BizHawk.Emulation.Cores.Nintendo.Gameboy;
|
|
|
|
|
using BizHawk.Client.Common;
|
|
|
|
|
|
2017-05-31 13:52:55 +00:00
|
|
|
|
namespace BizHawk.Client.EmuHawk
|
2014-05-12 17:24:43 +00:00
|
|
|
|
{
|
|
|
|
|
public partial class GBPrefs : Form
|
|
|
|
|
{
|
2017-05-31 13:52:55 +00:00
|
|
|
|
private GBPrefs()
|
2014-05-12 17:24:43 +00:00
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static void DoGBPrefsDialog(IWin32Window owner)
|
|
|
|
|
{
|
2017-05-31 13:52:55 +00:00
|
|
|
|
var gb = (Gameboy)Global.Emulator;
|
2014-10-19 01:22:47 +00:00
|
|
|
|
var s = gb.GetSettings();
|
|
|
|
|
var ss = gb.GetSyncSettings();
|
2014-05-12 17:24:43 +00:00
|
|
|
|
|
|
|
|
|
using (var dlg = new GBPrefs())
|
|
|
|
|
{
|
|
|
|
|
dlg.gbPrefControl1.PutSettings(s, ss);
|
2014-10-19 01:22:47 +00:00
|
|
|
|
dlg.gbPrefControl1.ColorGameBoy = gb.IsCGBMode();
|
2014-05-12 17:24:43 +00:00
|
|
|
|
if (dlg.ShowDialog(owner) == DialogResult.OK)
|
|
|
|
|
{
|
|
|
|
|
dlg.gbPrefControl1.GetSettings(out s, out ss);
|
2014-10-19 01:22:47 +00:00
|
|
|
|
gb.PutSettings(s);
|
2014-08-06 01:06:52 +00:00
|
|
|
|
if (dlg.gbPrefControl1.SyncSettingsChanged)
|
2017-05-31 13:52:55 +00:00
|
|
|
|
{
|
2014-08-06 01:06:52 +00:00
|
|
|
|
GlobalWin.MainForm.PutCoreSyncSettings(ss);
|
2017-05-31 13:52:55 +00:00
|
|
|
|
}
|
2014-05-12 17:24:43 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|