Debugger - fix updating of register values when they are labels (when the ability to set registers is not implemented by the core)

This commit is contained in:
adelikat 2014-12-23 17:12:06 +00:00
parent feb7f4c4f3
commit f3599989bc
1 changed files with 26 additions and 9 deletions
BizHawk.Client.EmuHawk/tools/Debugger

View File

@ -58,16 +58,33 @@ namespace BizHawk.Client.EmuHawk
});
}
Controls
.OfType<TextBox>()
.ToList()
.ForEach(textbox =>
{
if (textbox.Name == register.Key)
if (CanSetCpuRegisters)
{
Controls
.OfType<TextBox>()
.ToList()
.ForEach(textbox =>
{
textbox.Text = register.Value.Value.ToHexString(register.Value.BitSize / 16);
}
});
if (textbox.Name == register.Key)
{
textbox.Text = register.Value.Value.ToHexString(register.Value.BitSize / 16);
}
});
}
else
{
Controls
.OfType<Label>()
.ToList()
.ForEach(label =>
{
if (label.Name == register.Key)
{
label.Text = register.Value.Value.ToHexString(register.Value.BitSize / 16);
}
});
}
}
_supressChangeEvents = false;