From 2c66e3043ce21ec8a18d6153ec4d260f9cd96507 Mon Sep 17 00:00:00 2001 From: adelikat Date: Fri, 13 Dec 2019 15:44:50 -0600 Subject: [PATCH] a bit more cleanup --- BizHawk.Client.EmuHawk/tools/ToolManager.cs | 9 ++++----- BizHawk.sln.DotSettings | 2 ++ Bizware/BizHawk.Bizware.BizwareGL/IGL.cs | 4 ++-- Bizware/BizHawk.Bizware.BizwareGL/IGraphicsControl.cs | 5 ++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/BizHawk.Client.EmuHawk/tools/ToolManager.cs b/BizHawk.Client.EmuHawk/tools/ToolManager.cs index e0adf893e2..9e79908447 100644 --- a/BizHawk.Client.EmuHawk/tools/ToolManager.cs +++ b/BizHawk.Client.EmuHawk/tools/ToolManager.cs @@ -120,7 +120,7 @@ namespace BizHawk.Client.EmuHawk if (newTool is Form form) { - form.Owner = GlobalWin.MainForm; + form.Owner = _owner; } if (isExternal) @@ -211,12 +211,11 @@ namespace BizHawk.Client.EmuHawk { var form = (Form)tool; ToolStripItemCollection dest = null; - var oldsize = form.Size; // this should be the right time to grab this size + var oldSize = form.Size; // this should be the right time to grab this size foreach (Control c in form.Controls) { - if (c is MenuStrip) + if (c is MenuStrip ms) { - var ms = c as MenuStrip; foreach (ToolStripMenuItem submenu in ms.Items) { if (submenu.Text.Contains("Settings")) @@ -318,7 +317,7 @@ namespace BizHawk.Client.EmuHawk { settings.RestoreDefaults(); RefreshSettings(form, dest, settings, idx); - form.Size = oldsize; + form.Size = oldSize; form.GetType() .GetMethodsWithAttrib(typeof(RestoreDefaultsAttribute)) diff --git a/BizHawk.sln.DotSettings b/BizHawk.sln.DotSettings index f611c6aeba..c34d6b748d 100644 --- a/BizHawk.sln.DotSettings +++ b/BizHawk.sln.DotSettings @@ -189,6 +189,7 @@ True True True + True True True True @@ -300,6 +301,7 @@ True True True + True True True True diff --git a/Bizware/BizHawk.Bizware.BizwareGL/IGL.cs b/Bizware/BizHawk.Bizware.BizwareGL/IGL.cs index 9fc2114e00..8cc33a03c0 100644 --- a/Bizware/BizHawk.Bizware.BizwareGL/IGL.cs +++ b/Bizware/BizHawk.Bizware.BizwareGL/IGL.cs @@ -100,7 +100,7 @@ namespace BizHawk.Bizware.BizwareGL void BeginScene(); /// - /// Indicates end of scene rendering; use after alldraw calls as per normal + /// Indicates end of scene rendering; use after all draw calls as per normal /// void EndScene(); @@ -173,7 +173,7 @@ namespace BizHawk.Bizware.BizwareGL void SetTextureWrapMode(Texture2d tex, bool clamp); /// - /// Loads the texture with new data. This isnt supposed to be especially versatile, it just blasts a bitmap buffer into the texture + /// Loads the texture with new data. This isn't supposed to be especially versatile, it just blasts a bitmap buffer into the texture /// void LoadTextureData(Texture2d tex, BitmapBuffer bmp); diff --git a/Bizware/BizHawk.Bizware.BizwareGL/IGraphicsControl.cs b/Bizware/BizHawk.Bizware.BizwareGL/IGraphicsControl.cs index 21d426ee8d..724544f7f3 100644 --- a/Bizware/BizHawk.Bizware.BizwareGL/IGraphicsControl.cs +++ b/Bizware/BizHawk.Bizware.BizwareGL/IGraphicsControl.cs @@ -1,5 +1,4 @@ using System; -using System.Windows.Forms; namespace BizHawk.Bizware.BizwareGL { @@ -17,7 +16,7 @@ namespace BizHawk.Bizware.BizwareGL /// /// Makes this control current for rendering operations. - /// Note that at this time, the window size shouldnt change until End() or else something bad might happen + /// Note that at this time, the window size shouldn't change until End() or else something bad might happen /// Please be aware that this might change the rendering context, meaning that some things you set without calling Begin/End might not be affected /// void Begin(); @@ -27,7 +26,7 @@ namespace BizHawk.Bizware.BizwareGL /// NOTE: DO NOT EXPECT TO SEE BEGIN/END CALLED IN PAIRS, STRICTLY. /// this is more about GL context management than anything else. /// See GLManager for details. - /// In particular, dont expect to have End() called before doing certain things. Maybe use SwapBuffers instead + /// In particular, don't expect to have End() called before doing certain things. Maybe use SwapBuffers instead /// void End(); }