Debugger: Fix scrolling in disassembly view
This commit is contained in:
parent
fa08b25d37
commit
fc92d3c63e
|
@ -1617,7 +1617,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
if (_horizontalOrientation)
|
if (_horizontalOrientation)
|
||||||
{
|
{
|
||||||
ColumnScroll?.Invoke(_vBar, e);
|
ColumnScroll?.Invoke(_hBar, e);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -195,7 +195,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
//
|
//
|
||||||
this.label1.Location = new System.Drawing.Point(6, 23);
|
this.label1.Location = new System.Drawing.Point(6, 23);
|
||||||
this.label1.Name = "label1";
|
this.label1.Name = "label1";
|
||||||
this.label1.Text = "Cpu:";
|
this.label1.Text = "Cpu: Use '[' or ']' to change address, hold 'shift' for speed.";
|
||||||
//
|
//
|
||||||
// DisassemblerView
|
// DisassemblerView
|
||||||
//
|
//
|
||||||
|
|
|
@ -50,7 +50,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
private void Disassemble()
|
private void Disassemble()
|
||||||
{
|
{
|
||||||
int lineCount = DisassemblerView.RowCount + 2;
|
int lineCount = DisassemblerView.RowCount * 6 + 2;
|
||||||
|
|
||||||
_disassemblyLines.Clear();
|
_disassemblyLines.Clear();
|
||||||
uint a = _currentDisassemblerAddress;
|
uint a = _currentDisassemblerAddress;
|
||||||
|
@ -140,43 +140,17 @@ namespace BizHawk.Client.EmuHawk
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private bool _blockScroll;
|
private bool _blockScroll;
|
||||||
private void DisassemblerView_Scroll(object sender, EventArgs e)
|
private void DisassemblerView_Scroll(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
// This is really really gross, but it works
|
if (_blockScroll) { return; }
|
||||||
if (_blockScroll)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (sender is ScrollBar scrollBar)
|
// is this still needed?
|
||||||
{
|
|
||||||
if (scrollBar.Value > 0)
|
|
||||||
{
|
|
||||||
SmallIncrement();
|
|
||||||
|
|
||||||
_blockScroll = true;
|
|
||||||
scrollBar.Value = 14;
|
|
||||||
_blockScroll = false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SmallDecrement();
|
|
||||||
|
|
||||||
if (_currentDisassemblerAddress != 0)
|
|
||||||
{
|
|
||||||
_blockScroll = true;
|
|
||||||
scrollBar.Value = 14;
|
|
||||||
_blockScroll = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SetDisassemblerItemCount()
|
private void SetDisassemblerItemCount()
|
||||||
{
|
{
|
||||||
DisassemblerView.RowCount = DisassemblerView.VisibleRows + 2;
|
DisassemblerView.RowCount = DisassemblerView.VisibleRows * 6 + 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DisassemblerView_SizeChanged(object sender, EventArgs e)
|
private void DisassemblerView_SizeChanged(object sender, EventArgs e)
|
||||||
|
@ -208,14 +182,26 @@ namespace BizHawk.Client.EmuHawk
|
||||||
{
|
{
|
||||||
CopySelectedDisassembler();
|
CopySelectedDisassembler();
|
||||||
}
|
}
|
||||||
else if (e.IsPressed(Keys.PageDown))
|
else if (e.IsPressed(Keys.OemCloseBrackets))
|
||||||
{
|
{
|
||||||
SmallIncrement();
|
SmallIncrement();
|
||||||
}
|
}
|
||||||
else if (e.IsPressed(Keys.PageUp))
|
else if (e.IsPressed(Keys.OemOpenBrackets))
|
||||||
{
|
{
|
||||||
SmallDecrement();
|
SmallDecrement();
|
||||||
}
|
}
|
||||||
|
else if (e.IsShift(Keys.OemCloseBrackets))
|
||||||
|
{
|
||||||
|
SmallIncrement();
|
||||||
|
SmallIncrement();
|
||||||
|
SmallIncrement();
|
||||||
|
}
|
||||||
|
else if (e.IsShift(Keys.OemOpenBrackets))
|
||||||
|
{
|
||||||
|
SmallDecrement();
|
||||||
|
SmallDecrement();
|
||||||
|
SmallDecrement();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CopySelectedDisassembler()
|
private void CopySelectedDisassembler()
|
||||||
|
|
Loading…
Reference in New Issue