Debugger - use EmulatorServices
This commit is contained in:
parent
979fa2c0f7
commit
b3a47b911b
|
@ -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()
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue