Debugger - on refresh, check for new non-debugger made breakpoints and display them

This commit is contained in:
adelikat 2015-01-25 19:50:54 +00:00
parent 1235246d19
commit e1f59363f2
2 changed files with 25 additions and 1 deletions

View File

@ -86,11 +86,35 @@ namespace BizHawk.Client.EmuHawk.tools.Debugger
{
if (Enabled)
{
CheckForNewBreakpoints();
BreakpointView.ItemCount = Breakpoints.Count;
UpdateStatsLabel();
}
}
/// <summary>
/// Did any breakpoints get added from other sources such as lua?
/// </summary>
private void CheckForNewBreakpoints()
{
if (MCS != null)
{
foreach (var callback in MCS)
{
if (!Breakpoints.Any(b =>
b.Type == callback.Type &&
b.Address == callback.Address &&
b.Name == callback.Name &&
b.Callback == callback.Callback
))
{
Breakpoints.Add(new Breakpoint(Core, callback));
}
}
}
}
public void GenerateUI()
{
if (MCS != null)

View File

@ -143,7 +143,7 @@ namespace BizHawk.Client.EmuHawk
{
RegisterPanel.UpdateValues();
UpdateDisassembler();
// TODO: check for new breakpoints and add them to the Breakpoint list?
BreakPointControl1.UpdateValues();
}
public void FastUpdate()