2012-12-25 20:36:04 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Windows.Forms;
|
2013-12-27 17:59:19 +00:00
|
|
|
|
using BizHawk.Emulation.Cores.Nintendo.SNES;
|
|
|
|
|
using BizHawk.Client.Common;
|
2012-12-25 20:36:04 +00:00
|
|
|
|
|
2013-11-03 03:54:37 +00:00
|
|
|
|
namespace BizHawk.Client.EmuHawk
|
2012-12-25 20:36:04 +00:00
|
|
|
|
{
|
|
|
|
|
public partial class SNESOptions : Form
|
|
|
|
|
{
|
|
|
|
|
public SNESOptions()
|
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string Profile
|
|
|
|
|
{
|
|
|
|
|
get { return rbCompatibility.Checked ? "Compatibility" : "Performance"; }
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
rbCompatibility.Checked = (value == "Compatibility");
|
|
|
|
|
rbPerformance.Checked = (value == "Performance");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2013-01-18 05:06:26 +00:00
|
|
|
|
public bool UseRingBuffer
|
|
|
|
|
{
|
|
|
|
|
get { return cbRingbuf.Checked; }
|
|
|
|
|
set { cbRingbuf.Checked = value; }
|
|
|
|
|
}
|
|
|
|
|
|
2013-04-22 22:34:18 +00:00
|
|
|
|
public bool AlwaysDoubleSize
|
|
|
|
|
{
|
|
|
|
|
get { return cbDoubleSize.Checked; }
|
|
|
|
|
set { cbDoubleSize.Checked = value; }
|
|
|
|
|
}
|
|
|
|
|
|
2012-12-25 20:36:04 +00:00
|
|
|
|
private void btnOk_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
2014-05-04 14:10:28 +00:00
|
|
|
|
DialogResult = DialogResult.OK;
|
2012-12-25 20:36:04 +00:00
|
|
|
|
Close();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void btnCancel_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
2014-05-04 14:10:28 +00:00
|
|
|
|
DialogResult = DialogResult.Cancel;
|
2012-12-25 20:36:04 +00:00
|
|
|
|
Close();
|
|
|
|
|
}
|
2013-12-27 17:59:19 +00:00
|
|
|
|
|
|
|
|
|
public static void DoSettingsDialog(IWin32Window owner)
|
|
|
|
|
{
|
|
|
|
|
var s = (LibsnesCore.SnesSettings)Global.Emulator.GetSettings();
|
|
|
|
|
var ss = (LibsnesCore.SnesSyncSettings)Global.Emulator.GetSyncSettings();
|
|
|
|
|
var dlg = new SNESOptions
|
|
|
|
|
{
|
|
|
|
|
UseRingBuffer = s.UseRingBuffer,
|
|
|
|
|
AlwaysDoubleSize = s.AlwaysDoubleSize,
|
|
|
|
|
Profile = ss.Profile
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
var result = dlg.ShowDialog(owner);
|
|
|
|
|
if (result == DialogResult.OK)
|
|
|
|
|
{
|
|
|
|
|
s.UseRingBuffer = dlg.UseRingBuffer;
|
|
|
|
|
s.AlwaysDoubleSize = dlg.AlwaysDoubleSize;
|
|
|
|
|
ss.Profile = dlg.Profile;
|
|
|
|
|
GlobalWin.MainForm.PutCoreSettings(s);
|
|
|
|
|
GlobalWin.MainForm.PutCoreSyncSettings(ss);
|
|
|
|
|
}
|
|
|
|
|
}
|
2012-12-25 20:36:04 +00:00
|
|
|
|
}
|
|
|
|
|
}
|