Disable Tool Box on Linux (fixes #2741)

Was going to Close() the instances made by ToolBox.SetTools, which is probably a
good idea still, but it didn't cause my overridden LogWindow.OnClosing to run so
I gave up. The Tool Box is dumb anyway.
This commit is contained in:
YoshiRulz 2021-05-16 08:55:33 +10:00
parent e2b38732dd
commit fe6bf7ba12
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
3 changed files with 15 additions and 1 deletions

View File

@ -1,5 +1,7 @@
using System;
using System.Linq;
using BizHawk.Common;
using BizHawk.Emulation.Common;
using BizHawk.Emulation.Cores.Consoles.Nintendo.NDS;
using BizHawk.Emulation.Cores.Nintendo.Gameboy;
@ -349,7 +351,7 @@ namespace BizHawk.Client.EmuHawk
Tools.Load<TAStudio>();
break;
case "ToolBox":
Tools.Load<ToolBox>();
if (!OSTailoredCode.IsUnixHost) Tools.Load<ToolBox>();
break;
case "Virtual Pad":
Tools.Load<VirtualpadTool>();

View File

@ -349,6 +349,12 @@ namespace BizHawk.Client.EmuHawk
#else
SynclessRecordingMenuItem.Enabled = false;
#endif
if (OSTailoredCode.IsUnixHost)
{
ToolBoxMenuItem.Enabled = false;
ToolBoxMenuItem.Visible = false;
toolStripSeparator12.Visible = false;
}
Game = GameInfo.NullInstance;
_throttle = new Throttle();

View File

@ -25,6 +25,11 @@ namespace BizHawk.Client.EmuHawk
private void ToolBox_Load(object sender, EventArgs e)
{
if (OSTailoredCode.IsUnixHost)
{
Close();
return;
}
Location = new Point(
Owner.Location.X + Owner.Size.Width,
Owner.Location.Y
@ -33,6 +38,7 @@ namespace BizHawk.Client.EmuHawk
public override void Restart()
{
if (OSTailoredCode.IsUnixHost) return;
SetTools();
SetSize();