Debugger: Adjust character limit in goto popup based on memory size
This commit is contained in:
parent
b79983ec2f
commit
aee63d072c
3 changed files with 5 additions and 3 deletions
|
@ -172,7 +172,7 @@ namespace Mesen.GUI.Debugger.Controls
|
||||||
int currentAddr = (int)(this.ctrlHexBox.CurrentLine - 1) * this.ctrlHexBox.BytesPerLine;
|
int currentAddr = (int)(this.ctrlHexBox.CurrentLine - 1) * this.ctrlHexBox.BytesPerLine;
|
||||||
address.Address = (UInt32)currentAddr;
|
address.Address = (UInt32)currentAddr;
|
||||||
|
|
||||||
frmGoToLine frm = new frmGoToLine(address);
|
frmGoToLine frm = new frmGoToLine(address, (_byteProvider.Length - 1).ToString("X").Length);
|
||||||
frm.StartPosition = FormStartPosition.Manual;
|
frm.StartPosition = FormStartPosition.Manual;
|
||||||
Point topLeft = this.PointToScreen(new Point(0, 0));
|
Point topLeft = this.PointToScreen(new Point(0, 0));
|
||||||
frm.Location = new Point(topLeft.X + (this.Width - frm.Width) / 2, topLeft.Y + (this.Height - frm.Height) / 2);
|
frm.Location = new Point(topLeft.X + (this.Width - frm.Width) / 2, topLeft.Y + (this.Height - frm.Height) / 2);
|
||||||
|
|
|
@ -506,7 +506,7 @@ namespace Mesen.GUI.Debugger
|
||||||
|
|
||||||
address.Address = (UInt32)currentAddr;
|
address.Address = (UInt32)currentAddr;
|
||||||
|
|
||||||
frmGoToLine frm = new frmGoToLine(address);
|
frmGoToLine frm = new frmGoToLine(address, 4);
|
||||||
frm.StartPosition = FormStartPosition.Manual;
|
frm.StartPosition = FormStartPosition.Manual;
|
||||||
Point topLeft = this.PointToScreen(new Point(0, 0));
|
Point topLeft = this.PointToScreen(new Point(0, 0));
|
||||||
frm.Location = new Point(topLeft.X + (this.Width - frm.Width) / 2, topLeft.Y + (this.Height - frm.Height) / 2);
|
frm.Location = new Point(topLeft.X + (this.Width - frm.Width) / 2, topLeft.Y + (this.Height - frm.Height) / 2);
|
||||||
|
|
|
@ -13,12 +13,14 @@ namespace Mesen.GUI.Debugger
|
||||||
{
|
{
|
||||||
public partial class frmGoToLine : BaseConfigForm
|
public partial class frmGoToLine : BaseConfigForm
|
||||||
{
|
{
|
||||||
public frmGoToLine(GoToAddress address)
|
public frmGoToLine(GoToAddress address, int charLimit)
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
Entity = address;
|
Entity = address;
|
||||||
AddBinding("Address", txtAddress);
|
AddBinding("Address", txtAddress);
|
||||||
|
|
||||||
|
txtAddress.MaxLength = charLimit;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnShown(EventArgs e)
|
protected override void OnShown(EventArgs e)
|
||||||
|
|
Loading…
Add table
Reference in a new issue