2014-06-28 22:48:07 +00:00
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 ;
2014-06-28 22:48:07 +00:00
public PCEControllerConfig ( )
{
InitializeComponent ( ) ;
}
private void PCEControllerConfig_Load ( object sender , EventArgs e )
{
2014-10-19 01:22:47 +00:00
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 ;
2014-06-28 22:48:07 +00:00
}
private void OkBtn_Click ( object sender , EventArgs e )
{
2017-07-18 16:20:02 +00:00
GlobalWin . MainForm . PutCoreSyncSettings ( _controllerSettings ) ;
2014-06-28 22:48:07 +00:00
DialogResult = DialogResult . OK ;
Close ( ) ;
}
private void CancelBtn_Click ( object sender , EventArgs e )
{
DialogResult = DialogResult . Cancel ;
Close ( ) ;
}
}
}