misc cleanups in N6 config files
This commit is contained in:
parent
1164868063
commit
07cd535530
|
@ -75,7 +75,6 @@
|
||||||
this.Controls.Add(this.EnabledCheckbox);
|
this.Controls.Add(this.EnabledCheckbox);
|
||||||
this.Name = "N64ControllerSettingControl";
|
this.Name = "N64ControllerSettingControl";
|
||||||
this.Size = new System.Drawing.Size(290, 22);
|
this.Size = new System.Drawing.Size(290, 22);
|
||||||
this.Load += new System.EventHandler(this.N64ControllerSettingControl_Load);
|
|
||||||
this.ResumeLayout(false);
|
this.ResumeLayout(false);
|
||||||
this.PerformLayout();
|
this.PerformLayout();
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.ComponentModel;
|
|
||||||
using System.Drawing;
|
|
||||||
using System.Data;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
using BizHawk.Common;
|
|
||||||
using BizHawk.Common.ReflectionExtensions;
|
using BizHawk.Common.ReflectionExtensions;
|
||||||
|
|
||||||
using BizHawk.Emulation.Cores.Nintendo.N64;
|
using BizHawk.Emulation.Cores.Nintendo.N64;
|
||||||
|
@ -25,17 +19,13 @@ namespace BizHawk.Client.EmuHawk
|
||||||
ControllerNameLabel.Text = "Controller " + ControllerNumber;
|
ControllerNameLabel.Text = "Controller " + ControllerNumber;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void N64ControllerSettingControl_Load(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public int ControllerNumber
|
public int ControllerNumber
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return _controllerNumber;
|
return _controllerNumber;
|
||||||
}
|
}
|
||||||
|
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
_controllerNumber = value;
|
_controllerNumber = value;
|
||||||
|
|
|
@ -1,10 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.ComponentModel;
|
|
||||||
using System.Data;
|
|
||||||
using System.Drawing;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
using BizHawk.Emulation.Cores.Nintendo.N64;
|
using BizHawk.Emulation.Cores.Nintendo.N64;
|
||||||
|
|
|
@ -4560,7 +4560,7 @@
|
||||||
this.CancelBT.TabIndex = 105;
|
this.CancelBT.TabIndex = 105;
|
||||||
this.CancelBT.Text = "Cancel";
|
this.CancelBT.Text = "Cancel";
|
||||||
this.CancelBT.UseVisualStyleBackColor = true;
|
this.CancelBT.UseVisualStyleBackColor = true;
|
||||||
this.CancelBT.Click += new System.EventHandler(this.CancelBT_Click);
|
this.CancelBT.Click += new System.EventHandler(this.CancelBtn_Click);
|
||||||
//
|
//
|
||||||
// toolTip1
|
// toolTip1
|
||||||
//
|
//
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,9 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
|
|
||||||
using BizHawk.Common;
|
|
||||||
using BizHawk.Common.StringExtensions;
|
using BizHawk.Common.StringExtensions;
|
||||||
using BizHawk.Common.ReflectionExtensions;
|
using BizHawk.Common.ReflectionExtensions;
|
||||||
using BizHawk.Emulation.Cores.Nintendo.N64;
|
using BizHawk.Emulation.Cores.Nintendo.N64;
|
||||||
|
@ -14,8 +11,8 @@ namespace BizHawk.Client.EmuHawk
|
||||||
{
|
{
|
||||||
public partial class NewN64PluginSettings : Form
|
public partial class NewN64PluginSettings : Form
|
||||||
{
|
{
|
||||||
N64Settings s;
|
private N64Settings _s;
|
||||||
N64SyncSettings ss;
|
private N64SyncSettings _ss;
|
||||||
|
|
||||||
public NewN64PluginSettings()
|
public NewN64PluginSettings()
|
||||||
{
|
{
|
||||||
|
@ -32,36 +29,36 @@ namespace BizHawk.Client.EmuHawk
|
||||||
{
|
{
|
||||||
if (VideoResolutionComboBox.Text != "Custom")
|
if (VideoResolutionComboBox.Text != "Custom")
|
||||||
{
|
{
|
||||||
var video_settings = VideoResolutionComboBox.SelectedItem.ToString();
|
var videoSettings = VideoResolutionComboBox.SelectedItem.ToString();
|
||||||
var strArr = video_settings.Split('x');
|
var strArr = videoSettings.Split('x');
|
||||||
s.VideoSizeX = int.Parse(strArr[0].Trim());
|
_s.VideoSizeX = int.Parse(strArr[0].Trim());
|
||||||
s.VideoSizeY = int.Parse(strArr[1].Trim());
|
_s.VideoSizeY = int.Parse(strArr[1].Trim());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
s.VideoSizeX =
|
_s.VideoSizeX =
|
||||||
VideoResolutionXTextBox.Text.IsUnsigned() ?
|
VideoResolutionXTextBox.Text.IsUnsigned() ?
|
||||||
int.Parse(VideoResolutionXTextBox.Text) : 320;
|
int.Parse(VideoResolutionXTextBox.Text) : 320;
|
||||||
|
|
||||||
s.VideoSizeY =
|
_s.VideoSizeY =
|
||||||
VideoResolutionYTextBox.Text.IsUnsigned() ?
|
VideoResolutionYTextBox.Text.IsUnsigned() ?
|
||||||
int.Parse(VideoResolutionYTextBox.Text) : 240;
|
int.Parse(VideoResolutionYTextBox.Text) : 240;
|
||||||
}
|
}
|
||||||
|
|
||||||
ss.Core = CoreTypeDropdown.SelectedItem
|
_ss.Core = CoreTypeDropdown.SelectedItem
|
||||||
.ToString()
|
.ToString()
|
||||||
.GetEnumFromDescription<N64SyncSettings.CoreType>();
|
.GetEnumFromDescription<N64SyncSettings.CoreType>();
|
||||||
|
|
||||||
ss.Rsp = RspTypeDropdown.SelectedItem
|
_ss.Rsp = RspTypeDropdown.SelectedItem
|
||||||
.ToString()
|
.ToString()
|
||||||
.GetEnumFromDescription<N64SyncSettings.RspType>();
|
.GetEnumFromDescription<N64SyncSettings.RspType>();
|
||||||
|
|
||||||
ss.VideoPlugin = PluginComboBox.SelectedItem
|
_ss.VideoPlugin = PluginComboBox.SelectedItem
|
||||||
.ToString()
|
.ToString()
|
||||||
.GetEnumFromDescription<PluginType>();
|
.GetEnumFromDescription<PluginType>();
|
||||||
|
|
||||||
PutSettings(s);
|
PutSettings(_s);
|
||||||
PutSyncSettings(ss);
|
PutSyncSettings(_ss);
|
||||||
|
|
||||||
DialogResult = DialogResult.OK;
|
DialogResult = DialogResult.OK;
|
||||||
Close();
|
Close();
|
||||||
|
@ -69,21 +66,21 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
private void NewN64PluginSettings_Load(object sender, EventArgs e)
|
private void NewN64PluginSettings_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
s = GetSettings();
|
_s = GetSettings();
|
||||||
ss = GetSyncSettings();
|
_ss = GetSyncSettings();
|
||||||
|
|
||||||
CoreTypeDropdown.PopulateFromEnum<N64SyncSettings.CoreType>(ss.Core);
|
CoreTypeDropdown.PopulateFromEnum<N64SyncSettings.CoreType>(_ss.Core);
|
||||||
RspTypeDropdown.PopulateFromEnum<N64SyncSettings.RspType>(ss.Rsp);
|
RspTypeDropdown.PopulateFromEnum<N64SyncSettings.RspType>(_ss.Rsp);
|
||||||
PluginComboBox.PopulateFromEnum<PluginType>(ss.VideoPlugin);
|
PluginComboBox.PopulateFromEnum<PluginType>(_ss.VideoPlugin);
|
||||||
|
|
||||||
VideoResolutionXTextBox.Text = s.VideoSizeX.ToString();
|
VideoResolutionXTextBox.Text = _s.VideoSizeX.ToString();
|
||||||
VideoResolutionYTextBox.Text = s.VideoSizeY.ToString();
|
VideoResolutionYTextBox.Text = _s.VideoSizeY.ToString();
|
||||||
|
|
||||||
var video_setting = s.VideoSizeX
|
var videoSetting = _s.VideoSizeX
|
||||||
+ " x "
|
+ " x "
|
||||||
+ s.VideoSizeY;
|
+ _s.VideoSizeY;
|
||||||
|
|
||||||
var index = VideoResolutionComboBox.Items.IndexOf(video_setting);
|
var index = VideoResolutionComboBox.Items.IndexOf(videoSetting);
|
||||||
if (index >= 0)
|
if (index >= 0)
|
||||||
{
|
{
|
||||||
VideoResolutionComboBox.SelectedIndex = index;
|
VideoResolutionComboBox.SelectedIndex = index;
|
||||||
|
@ -94,10 +91,10 @@ namespace BizHawk.Client.EmuHawk
|
||||||
ShowCustomVideoResolutionControls();
|
ShowCustomVideoResolutionControls();
|
||||||
}
|
}
|
||||||
|
|
||||||
RicePropertyGrid.SelectedObject = ss.RicePlugin;
|
RicePropertyGrid.SelectedObject = _ss.RicePlugin;
|
||||||
Glidemk2PropertyGrid.SelectedObject = ss.Glide64mk2Plugin;
|
Glidemk2PropertyGrid.SelectedObject = _ss.Glide64mk2Plugin;
|
||||||
GlidePropertyGrid.SelectedObject = ss.GlidePlugin;
|
GlidePropertyGrid.SelectedObject = _ss.GlidePlugin;
|
||||||
JaboPropertyGrid.SelectedObject = ss.JaboPlugin;
|
JaboPropertyGrid.SelectedObject = _ss.JaboPlugin;
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Setting Get/Set
|
#region Setting Get/Set
|
||||||
|
@ -159,8 +156,8 @@ namespace BizHawk.Client.EmuHawk
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
HideCustomVideoResolutionControls();
|
HideCustomVideoResolutionControls();
|
||||||
var new_resolution = VideoResolutionComboBox.SelectedItem.ToString();
|
var newResolution = VideoResolutionComboBox.SelectedItem.ToString();
|
||||||
var strArr = new_resolution.Split('x');
|
var strArr = newResolution.Split('x');
|
||||||
VideoResolutionXTextBox.Text = strArr[0].Trim();
|
VideoResolutionXTextBox.Text = strArr[0].Trim();
|
||||||
VideoResolutionYTextBox.Text = strArr[1].Trim();
|
VideoResolutionYTextBox.Text = strArr[1].Trim();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue