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

View File

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

View File

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