2014-06-28 22:48:07 +00:00
|
|
|
|
using System;
|
|
|
|
|
using System.Windows.Forms;
|
|
|
|
|
using BizHawk.Emulation.Cores.PCEngine;
|
|
|
|
|
|
|
|
|
|
namespace BizHawk.Client.EmuHawk
|
|
|
|
|
{
|
|
|
|
|
public partial class PCEControllerConfig : Form
|
|
|
|
|
{
|
2019-12-16 23:06:29 +00:00
|
|
|
|
private readonly MainForm _mainForm;
|
|
|
|
|
private readonly PCEngine.PCESyncSettings _syncSettings;
|
2017-07-18 16:01:50 +00:00
|
|
|
|
|
2019-12-16 23:06:29 +00:00
|
|
|
|
public PCEControllerConfig(
|
|
|
|
|
MainForm mainForm,
|
|
|
|
|
PCEngine.PCESyncSettings syncSettings)
|
2014-06-28 22:48:07 +00:00
|
|
|
|
{
|
2019-12-16 23:06:29 +00:00
|
|
|
|
_mainForm = mainForm;
|
|
|
|
|
_syncSettings = syncSettings;
|
2014-06-28 22:48:07 +00:00
|
|
|
|
InitializeComponent();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void PCEControllerConfig_Load(object sender, EventArgs e)
|
|
|
|
|
{
|
2019-12-16 23:06:29 +00:00
|
|
|
|
ControllerPropertyGrid.SelectedObject = _syncSettings;
|
2014-06-28 22:48:07 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void OkBtn_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
2019-12-16 23:06:29 +00:00
|
|
|
|
_mainForm.PutCoreSyncSettings(_syncSettings);
|
2014-06-28 22:48:07 +00:00
|
|
|
|
DialogResult = DialogResult.OK;
|
|
|
|
|
Close();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void CancelBtn_Click(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
DialogResult = DialogResult.Cancel;
|
|
|
|
|
Close();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|