a bit more cleanup

This commit is contained in:
adelikat 2019-12-13 15:44:50 -06:00
parent 06e1149cfe
commit 2c66e3043c
4 changed files with 10 additions and 10 deletions

View File

@ -120,7 +120,7 @@ namespace BizHawk.Client.EmuHawk
if (newTool is Form form) if (newTool is Form form)
{ {
form.Owner = GlobalWin.MainForm; form.Owner = _owner;
} }
if (isExternal) if (isExternal)
@ -211,12 +211,11 @@ namespace BizHawk.Client.EmuHawk
{ {
var form = (Form)tool; var form = (Form)tool;
ToolStripItemCollection dest = null; 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) 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) foreach (ToolStripMenuItem submenu in ms.Items)
{ {
if (submenu.Text.Contains("Settings")) if (submenu.Text.Contains("Settings"))
@ -318,7 +317,7 @@ namespace BizHawk.Client.EmuHawk
{ {
settings.RestoreDefaults(); settings.RestoreDefaults();
RefreshSettings(form, dest, settings, idx); RefreshSettings(form, dest, settings, idx);
form.Size = oldsize; form.Size = oldSize;
form.GetType() form.GetType()
.GetMethodsWithAttrib(typeof(RestoreDefaultsAttribute)) .GetMethodsWithAttrib(typeof(RestoreDefaultsAttribute))

View File

@ -189,6 +189,7 @@
<s:Boolean x:Key="/Default/UserDictionary/Words/=Autosave/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/UserDictionary/Words/=Autosave/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=backcolor/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/UserDictionary/Words/=backcolor/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Bezier/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/UserDictionary/Words/=Bezier/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Bizware/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=blitter/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/UserDictionary/Words/=blitter/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Bools/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/UserDictionary/Words/=Bools/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=botting/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/UserDictionary/Words/=botting/@EntryIndexedValue">True</s:Boolean>
@ -300,6 +301,7 @@
<s:Boolean x:Key="/Default/UserDictionary/Words/=scanlines/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/UserDictionary/Words/=scanlines/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Screenshot/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/UserDictionary/Words/=Screenshot/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Screensize/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/UserDictionary/Words/=Screensize/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=shaders/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=speccy/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/UserDictionary/Words/=speccy/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Sram/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/UserDictionary/Words/=Sram/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=sSeeki/@EntryIndexedValue">True</s:Boolean> <s:Boolean x:Key="/Default/UserDictionary/Words/=sSeeki/@EntryIndexedValue">True</s:Boolean>

View File

@ -100,7 +100,7 @@ namespace BizHawk.Bizware.BizwareGL
void BeginScene(); void BeginScene();
/// <summary> /// <summary>
/// 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
/// </summary> /// </summary>
void EndScene(); void EndScene();
@ -173,7 +173,7 @@ namespace BizHawk.Bizware.BizwareGL
void SetTextureWrapMode(Texture2d tex, bool clamp); void SetTextureWrapMode(Texture2d tex, bool clamp);
/// <summary> /// <summary>
/// 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
/// </summary> /// </summary>
void LoadTextureData(Texture2d tex, BitmapBuffer bmp); void LoadTextureData(Texture2d tex, BitmapBuffer bmp);

View File

@ -1,5 +1,4 @@
using System; using System;
using System.Windows.Forms;
namespace BizHawk.Bizware.BizwareGL namespace BizHawk.Bizware.BizwareGL
{ {
@ -17,7 +16,7 @@ namespace BizHawk.Bizware.BizwareGL
/// <summary> /// <summary>
/// Makes this control current for rendering operations. /// 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 /// Please be aware that this might change the rendering context, meaning that some things you set without calling Begin/End might not be affected
/// </summary> /// </summary>
void Begin(); void Begin();
@ -27,7 +26,7 @@ namespace BizHawk.Bizware.BizwareGL
/// NOTE: DO NOT EXPECT TO SEE BEGIN/END CALLED IN PAIRS, STRICTLY. /// NOTE: DO NOT EXPECT TO SEE BEGIN/END CALLED IN PAIRS, STRICTLY.
/// this is more about GL context management than anything else. /// this is more about GL context management than anything else.
/// See GLManager for details. /// 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
/// </summary> /// </summary>
void End(); void End();
} }