ToolBox use an IEmulator RequiredService instead of Global.Emulator

This commit is contained in:
adelikat 2016-12-06 10:44:37 -06:00
parent b346f9e7c5
commit ad41019a29
1 changed files with 4 additions and 1 deletions

View File

@ -12,6 +12,9 @@ namespace BizHawk.Client.EmuHawk
{
public partial class ToolBox : Form, IToolForm
{
[RequiredService]
private IEmulator Emulator { get; set; }
public ToolBox()
{
InitializeComponent();
@ -61,7 +64,7 @@ namespace BizHawk.Client.EmuHawk
continue;
if (t == typeof(GBGameGenie)) // Hack, this tool is specific to a system id and a sub-system (gb and gg) we have no reasonable way to declare a dependency like that
continue;
if (!ServiceInjector.IsAvailable(Global.Emulator.ServiceProvider, t))
if (!ServiceInjector.IsAvailable(Emulator.ServiceProvider, t))
continue;
var instance = Activator.CreateInstance(t);