Fix some annoying warnings and some misc code cleanup

This commit is contained in:
adelikat 2013-09-14 19:34:14 +00:00
parent 299ee4673e
commit 7a08cb1075
9 changed files with 919 additions and 943 deletions

File diff suppressed because it is too large Load Diff

View File

@ -280,7 +280,7 @@ namespace BizHawk.Emulation.Consoles.Nintendo
#if VS2012
[MethodImpl(MethodImplOptions.AggressiveInlining)]
#endif
protected void RunCpuOne()
private void RunCpuOne()
{
cpu_stepcounter++;
if (cpu_stepcounter == cpu_sequence[cpu_step])

View File

@ -111,7 +111,7 @@ namespace BizHawk.DiscSystem
throw new NotImplementedException("Blob_ZeroPadAdapter hasnt been tested yet! please report this!");
//something about this seems unnecessarily complex, but... i dunno.
/*
//figure out how much remains until the zero-padding begins
long remain = byte_pos - padFrom;
int todo;
@ -144,6 +144,7 @@ namespace BizHawk.DiscSystem
totalRead += todo;
return totalRead;
*/
}
public void Dispose()

View File

@ -55,11 +55,12 @@
//
// menuStrip1
//
this.menuStrip1.ClickThrough = true;
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.optionsToolStripMenuItem});
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Size = new System.Drawing.Size(302, 24);
this.menuStrip1.Size = new System.Drawing.Size(292, 24);
this.menuStrip1.TabIndex = 8;
this.menuStrip1.Text = "menuStrip1";
//
@ -104,7 +105,7 @@
// GGCodeMaskBox
//
this.GGCodeMaskBox.Location = new System.Drawing.Point(18, 30);
this.GGCodeMaskBox.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.GGCodeMaskBox.Margin = new System.Windows.Forms.Padding(2);
this.GGCodeMaskBox.Mask = ">AAAA-AAAA";
this.GGCodeMaskBox.Name = "GGCodeMaskBox";
this.GGCodeMaskBox.Size = new System.Drawing.Size(76, 20);
@ -118,7 +119,7 @@
//
this.addcheatbt.Enabled = false;
this.addcheatbt.Location = new System.Drawing.Point(156, 117);
this.addcheatbt.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.addcheatbt.Margin = new System.Windows.Forms.Padding(2);
this.addcheatbt.Name = "addcheatbt";
this.addcheatbt.Size = new System.Drawing.Size(72, 26);
this.addcheatbt.TabIndex = 10;
@ -223,7 +224,7 @@
// ClearBT
//
this.ClearBT.Location = new System.Drawing.Point(66, 117);
this.ClearBT.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.ClearBT.Margin = new System.Windows.Forms.Padding(2);
this.ClearBT.Name = "ClearBT";
this.ClearBT.Size = new System.Drawing.Size(68, 26);
this.ClearBT.TabIndex = 13;
@ -235,9 +236,9 @@
//
this.groupBox2.Controls.Add(this.cheatname);
this.groupBox2.Location = new System.Drawing.Point(20, 154);
this.groupBox2.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.groupBox2.Margin = new System.Windows.Forms.Padding(2);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Padding = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.groupBox2.Padding = new System.Windows.Forms.Padding(2);
this.groupBox2.Size = new System.Drawing.Size(266, 50);
this.groupBox2.TabIndex = 14;
this.groupBox2.TabStop = false;
@ -246,7 +247,7 @@
// cheatname
//
this.cheatname.Location = new System.Drawing.Point(18, 24);
this.cheatname.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.cheatname.Margin = new System.Windows.Forms.Padding(2);
this.cheatname.Name = "cheatname";
this.cheatname.Size = new System.Drawing.Size(228, 20);
this.cheatname.TabIndex = 0;
@ -255,7 +256,7 @@
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(302, 217);
this.ClientSize = new System.Drawing.Size(292, 217);
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.ClearBT);
this.Controls.Add(this.groupBox1);
@ -272,6 +273,7 @@
this.Name = "GenGameGenie";
this.ShowIcon = false;
this.Text = "Genesis Game Genie Encoder / Decoder";
this.Load += new System.EventHandler(this.GENGameGenie_Load);
this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout();
this.GameGenieCodeBox.ResumeLayout(false);

View File

@ -6,6 +6,8 @@ using System.Globalization;
using System.Text.RegularExpressions;
using BizHawk.Emulation.Consoles.Sega;
#pragma warning disable 675 //TOOD: fix the potential problem this is masking
namespace BizHawk.MultiClient
{
public partial class GenGameGenie : Form
@ -295,9 +297,11 @@ namespace BizHawk.MultiClient
private void GENGameGenie_Load(object sender, EventArgs e)
{
if (Global.Config.GENGGSaveWindowPosition && Global.Config.GENGGWndx >= 0 && Global.Config.GENGGWndy >= 0)
{
Location = new Point(Global.Config.GENGGWndx, Global.Config.GENGGWndy);
}
}
private void SaveConfigSettings()

View File

@ -91,7 +91,7 @@ namespace BizHawk.MultiClient
{
new SingleInstanceController(args).Run(args);
}
catch (ObjectDisposedException ex)
catch (ObjectDisposedException)
{
/*Eat it, MainForm disposed itself and Run attempts to dispose of itself. Eventually we would want to figure out a way to prevent that, but in the meantime it is harmless, so just eat the error*/
}

View File

@ -28,47 +28,38 @@ namespace BizHawk.MultiClient
RewindFramesUsedLabel.Text = "N/A";
}
try
{
DiskBufferCheckbox.Checked = Global.Config.Rewind_OnDisk;
RewindIsThreadedCheckbox.Checked = Global.Config.Rewind_IsThreaded;
StateSize = Global.Emulator.SaveStateBinary().Length;
BufferSizeUpDown.Value = Global.Config.Rewind_BufferSize;
DiskBufferCheckbox.Checked = Global.Config.Rewind_OnDisk;
RewindIsThreadedCheckbox.Checked = Global.Config.Rewind_IsThreaded;
StateSize = Global.Emulator.SaveStateBinary().Length;
BufferSizeUpDown.Value = Global.Config.Rewind_BufferSize;
MediumStateSize = Global.Config.Rewind_MediumStateSize;
LargeStateSize = Global.Config.Rewind_LargeStateSize;
MediumStateSize = Global.Config.Rewind_MediumStateSize;
LargeStateSize = Global.Config.Rewind_LargeStateSize;
UseDeltaCompression.Checked = Global.Config.Rewind_UseDelta;
UseDeltaCompression.Checked = Global.Config.Rewind_UseDelta;
SmallSavestateNumeric.Value = Global.Config.RewindFrequencySmall;
MediumSavestateNumeric.Value = Global.Config.RewindFrequencyMedium;
LargeSavestateNumeric.Value = Global.Config.RewindFrequencyLarge;
SmallSavestateNumeric.Value = Global.Config.RewindFrequencySmall;
MediumSavestateNumeric.Value = Global.Config.RewindFrequencyMedium;
LargeSavestateNumeric.Value = Global.Config.RewindFrequencyLarge;
SmallStateEnabledBox.Checked = Global.Config.RewindEnabledSmall;
MediumStateEnabledBox.Checked = Global.Config.RewindEnabledMedium;
LargeStateEnabledBox.Checked = Global.Config.RewindEnabledLarge;
SmallStateEnabledBox.Checked = Global.Config.RewindEnabledSmall;
MediumStateEnabledBox.Checked = Global.Config.RewindEnabledMedium;
LargeStateEnabledBox.Checked = Global.Config.RewindEnabledLarge;
SetSmallEnabled();
SetMediumEnabled();
SetLargeEnabled();
SetSmallEnabled();
SetMediumEnabled();
SetLargeEnabled();
SetStateSize();
SetStateSize();
int medium_state_size_kb = Global.Config.Rewind_MediumStateSize / 1024;
int large_state_size_kb = Global.Config.Rewind_LargeStateSize / 1024;
int medium_state_size_kb = Global.Config.Rewind_MediumStateSize / 1024;
int large_state_size_kb = Global.Config.Rewind_LargeStateSize / 1024;
MediumStateTrackbar.Value = medium_state_size_kb;
MediumStateUpDown.Value = (decimal)medium_state_size_kb;
LargeStateTrackbar.Value = large_state_size_kb;
LargeStateUpDown.Value = (decimal)large_state_size_kb;
}
catch (Exception ex)
{
int x = 0;
x++;
int y = x;
y++;
}
MediumStateTrackbar.Value = medium_state_size_kb;
MediumStateUpDown.Value = (decimal)medium_state_size_kb;
LargeStateTrackbar.Value = large_state_size_kb;
LargeStateUpDown.Value = (decimal)large_state_size_kb;
}
private void SetStateSize()

View File

@ -276,14 +276,14 @@ namespace BizHawk.MultiClient
/// <returns></returns>
public static Watch ConvertLegacyWatch(Watch_Legacy watch)
{
Watch w = Watch.GenerateWatch(
Watch w = GenerateWatch(
watch.Domain,
watch.Address,
Watch.SizeFromChar(watch.TypeChar),
SizeFromChar(watch.TypeChar),
!String.IsNullOrWhiteSpace(watch.Notes)
);
w.Type = Watch.DisplayTypeFromChar(watch.SignedChar);
w.Type = DisplayTypeFromChar(watch.SignedChar);
if (!String.IsNullOrWhiteSpace(watch.Notes))
{

View File

@ -9,8 +9,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BizHawk.MultiClient_v4.5",
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DiscoHawk_4.5", "DiscoHawk\DiscoHawk_4.5.csproj", "{C4366030-6D03-424B-AE53-F4F43BB217C3}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BizHawk.PCE_Debugger", "BizHawk.PCE_Debugger\BizHawk.PCE_Debugger.csproj", "{2D7F5A4A-C3C4-41CD-839C-C35F3DD58725}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -79,20 +77,6 @@ Global
{C4366030-6D03-424B-AE53-F4F43BB217C3}.Release|Win32.ActiveCfg = Release|Any CPU
{C4366030-6D03-424B-AE53-F4F43BB217C3}.Release|Win32.Build.0 = Release|Any CPU
{C4366030-6D03-424B-AE53-F4F43BB217C3}.Release|x86.ActiveCfg = Release|Any CPU
{2D7F5A4A-C3C4-41CD-839C-C35F3DD58725}.Debug|Any CPU.ActiveCfg = Debug|x86
{2D7F5A4A-C3C4-41CD-839C-C35F3DD58725}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{2D7F5A4A-C3C4-41CD-839C-C35F3DD58725}.Debug|Mixed Platforms.Build.0 = Debug|x86
{2D7F5A4A-C3C4-41CD-839C-C35F3DD58725}.Debug|Win32.ActiveCfg = Debug|x86
{2D7F5A4A-C3C4-41CD-839C-C35F3DD58725}.Debug|Win32.Build.0 = Debug|x86
{2D7F5A4A-C3C4-41CD-839C-C35F3DD58725}.Debug|x86.ActiveCfg = Debug|x86
{2D7F5A4A-C3C4-41CD-839C-C35F3DD58725}.Debug|x86.Build.0 = Debug|x86
{2D7F5A4A-C3C4-41CD-839C-C35F3DD58725}.Release|Any CPU.ActiveCfg = Release|x86
{2D7F5A4A-C3C4-41CD-839C-C35F3DD58725}.Release|Mixed Platforms.ActiveCfg = Release|x86
{2D7F5A4A-C3C4-41CD-839C-C35F3DD58725}.Release|Mixed Platforms.Build.0 = Release|x86
{2D7F5A4A-C3C4-41CD-839C-C35F3DD58725}.Release|Win32.ActiveCfg = Release|x86
{2D7F5A4A-C3C4-41CD-839C-C35F3DD58725}.Release|Win32.Build.0 = Release|x86
{2D7F5A4A-C3C4-41CD-839C-C35F3DD58725}.Release|x86.ActiveCfg = Release|x86
{2D7F5A4A-C3C4-41CD-839C-C35F3DD58725}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE