BizHawk/BizHawk.Client.EmuHawk/config/PCE/PCEControllerConfig.cs

39 lines
1.1 KiB
C#
Raw Normal View History

using System;
using System.Windows.Forms;
using BizHawk.Emulation.Cores.PCEngine;
using BizHawk.Client.Common;
namespace BizHawk.Client.EmuHawk
{
public partial class PCEControllerConfig : Form
{
2017-07-18 16:01:50 +00:00
private PCEngine.PCESyncSettings _controllerSettings;
public PCEControllerConfig()
{
InitializeComponent();
}
private void PCEControllerConfig_Load(object sender, EventArgs e)
{
var pceSettings = ((PCEngine)Global.Emulator).GetSyncSettings();
2017-07-18 16:01:50 +00:00
_controllerSettings = pceSettings; // Assumes only controller data is in sync settings! If there are ever more sync settings, this dialog should just become a general sync settings dialog (or both settings/sync settings)
ControllerPropertyGrid.SelectedObject = _controllerSettings;
}
private void OkBtn_Click(object sender, EventArgs e)
{
2017-07-18 16:20:02 +00:00
GlobalWin.MainForm.PutCoreSyncSettings(_controllerSettings);
DialogResult = DialogResult.OK;
Close();
}
private void CancelBtn_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.Cancel;
Close();
}
}
}