diff --git a/src/BizHawk.Client.EmuHawk/MainForm.Events.cs b/src/BizHawk.Client.EmuHawk/MainForm.Events.cs index b4c8ddc990..c14fb8f228 100644 --- a/src/BizHawk.Client.EmuHawk/MainForm.Events.cs +++ b/src/BizHawk.Client.EmuHawk/MainForm.Events.cs @@ -1205,18 +1205,10 @@ namespace BizHawk.Client.EmuHawk foreach (var item in ExtToolManager.ToolStripMenu) { - if (item.Tag is ValueTuple tuple) + if (item.Enabled && item.Tag is ValueTuple tuple) { - if (item.Enabled) - { - item.Click += (clickEventSender, clickEventArgs) => Tools.LoadExternalToolForm(tuple.Item1, tuple.Item2); - } + item.Click += (_, _) => Tools.LoadExternalToolForm(tuple.Item1, tuple.Item2); } - else - { - item.Image = Properties.Resources.ExclamationRed; - } - ExternalToolMenuItem.DropDownItems.Add(item); } diff --git a/src/BizHawk.Client.EmuHawk/tools/ExternalToolManager.cs b/src/BizHawk.Client.EmuHawk/tools/ExternalToolManager.cs index 2edfc16f8a..2394478c0e 100644 --- a/src/BizHawk.Client.EmuHawk/tools/ExternalToolManager.cs +++ b/src/BizHawk.Client.EmuHawk/tools/ExternalToolManager.cs @@ -71,7 +71,11 @@ namespace BizHawk.Client.EmuHawk private ToolStripMenuItem GenerateToolTipFromFileName(string fileName) { if (fileName == null) throw new Exception(); - var item = new ToolStripMenuItem(Path.GetFileName(fileName)) { Enabled = false }; + var item = new ToolStripMenuItem(Path.GetFileName(fileName)) + { + Enabled = false, + Image = Properties.Resources.ExclamationRed, + }; try { if (!OSTailoredCode.IsUnixHost) MotWHack.RemoveMOTW(fileName); @@ -89,6 +93,8 @@ namespace BizHawk.Client.EmuHawk { foreach (var depFilename in toolAttribute.LoadAssemblyFiles) Assembly.LoadFrom($"{_paths[PathEntryCollection.GLOBAL, "External Tools"].Path}/{depFilename}"); } + + item.Image = null; // no errors, remove error icon var embeddedIconAttr = allAttrs.OfType().FirstOrDefault(); if (embeddedIconAttr != null) {