Debugger - use EmulatorServices

This commit is contained in:
adelikat 2014-12-13 23:15:39 +00:00
parent 979fa2c0f7
commit b3a47b911b
2 changed files with 14 additions and 16 deletions

View File

@ -1,7 +1,18 @@
namespace BizHawk.Client.EmuHawk
using System;
using System.Collections.Generic;
using BizHawk.Emulation.Common;
using BizHawk.Emulation.Common.IEmulatorExtensions;
using BizHawk.Client.Common;
namespace BizHawk.Client.EmuHawk
{
public partial class GenericDebugger : IToolForm
{
public IDictionary<Type, object> EmulatorServices { private get; set; }
private IDebuggable Core { get { return (IDebuggable)EmulatorServices[typeof(IDebuggable)]; } }
private IDisassemblable Disassembler;
public void UpdateValues()
{
RegisterPanel.UpdateValues();
@ -19,7 +30,7 @@
return;
}
// TODO
Disassembler = Global.Emulator.AsDissassembler();
}
public bool AskSaveChanges()

View File

@ -13,16 +13,12 @@ using BizHawk.Client.Common;
namespace BizHawk.Client.EmuHawk
{
[RequiredServices(typeof(IDebuggable))]
public partial class GenericDebugger : Form, IToolForm, IControlMainform
{
private int _defaultWidth;
private int _defaultHeight;
private IDebuggable Core;
private IDisassemblable Disassembler;
public IDictionary<Type, object> EmulatorServices { private get; set; }
public GenericDebugger()
{
InitializeComponent();
@ -49,15 +45,6 @@ namespace BizHawk.Client.EmuHawk
Size = Global.Config.GenericDebuggerSettings.WindowSize;
}
if (Global.Emulator.CanDebug())
{
Core = Global.Emulator.AsDebuggable();
}
else
{
Close();
}
Disassembler = Global.Emulator.AsDissassembler();
EngageDebugger();