N64 plugin config code cleanup

This commit is contained in:
adelikat 2019-12-15 16:22:51 -06:00
parent 0b19090fc2
commit 5ec3ac021e
2 changed files with 12 additions and 16 deletions

View File

@ -1,6 +1,6 @@
namespace BizHawk.Client.EmuHawk
{
partial class N64VideoPluginconfig
partial class N64VideoPluginConfig
{
/// <summary>
/// Required designer variable.
@ -29,7 +29,7 @@
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(N64VideoPluginconfig));
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(N64VideoPluginConfig));
this.N64plugintabcontrol = new System.Windows.Forms.TabControl();
this.N64vpluginglobaltab = new System.Windows.Forms.TabPage();
this.VideoResolutionYTextBox = new System.Windows.Forms.TextBox();
@ -4627,10 +4627,10 @@
this.Controls.Add(this.N64plugintabcontrol);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Icon = global::BizHawk.Client.EmuHawk.Properties.Resources.monitor_MultiSize;
this.Name = "N64VideoPluginconfig";
this.Name = "N64VideoPluginConfig";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Plugin Settings";
this.Load += new System.EventHandler(this.N64VideoPluginconfig_Load);
this.Load += new System.EventHandler(this.N64VideoPluginConfig_Load);
this.N64plugintabcontrol.ResumeLayout(false);
this.N64vpluginglobaltab.ResumeLayout(false);
this.N64vpluginglobaltab.PerformLayout();

View File

@ -1,5 +1,4 @@
using System;
using System.Linq;
using System.Windows.Forms;
using BizHawk.Common.StringExtensions;
@ -10,7 +9,7 @@ using BizHawk.Client.EmuHawk.WinFormExtensions;
namespace BizHawk.Client.EmuHawk
{
public partial class N64VideoPluginconfig : Form
public partial class N64VideoPluginConfig : Form
{
private N64Settings _s;
private N64SyncSettings _ss;
@ -37,7 +36,7 @@ namespace BizHawk.Client.EmuHawk
private bool _programmaticallyChangingPluginComboBox = false;
public N64VideoPluginconfig()
public N64VideoPluginConfig()
{
InitializeComponent();
}
@ -507,7 +506,7 @@ namespace BizHawk.Client.EmuHawk
PutSyncSettings(_ss);
}
private void N64VideoPluginconfig_Load(object sender, EventArgs e)
private void N64VideoPluginConfig_Load(object sender, EventArgs e)
{
_s = GetSettings();
_ss = GetSyncSettings();
@ -930,7 +929,6 @@ namespace BizHawk.Client.EmuHawk
}
}
private void UpdateGlideHacksSection()
{
if (GlideUseDefaultHacks1.Checked || GlideUseDefaultHacks2.Checked)
@ -1202,10 +1200,10 @@ namespace BizHawk.Client.EmuHawk
VideoResolutionComboBox.SelectedIndex = 0;
}
var strArr = new string[] {};
string[] strArr;
int oldSizeX, oldSizeY;
var oldResolution = VideoResolutionComboBox.SelectedItem.ToString();
var oldResolution = VideoResolutionComboBox.SelectedItem?.ToString() ?? "";
if (oldResolution != _customResItemName)
{
strArr = oldResolution.Split('x');
@ -1248,11 +1246,9 @@ namespace BizHawk.Client.EmuHawk
bestFit = 0;
break;
}
else
{
bestFit = i - 1;
break;
}
bestFit = i - 1;
break;
}
}
}