From 143c172cf0143efa6e535afb0be754938d91abb8 Mon Sep 17 00:00:00 2001 From: adelikat Date: Sat, 2 Feb 2019 17:08:26 -0600 Subject: [PATCH] debugger - dissassembler - wire pageup/pagedown to incement/decrement --- .../Debugger/GenericDebugger.Disassembler.cs | 30 +++++++++++++++---- 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/BizHawk.Client.EmuHawk/tools/Debugger/GenericDebugger.Disassembler.cs b/BizHawk.Client.EmuHawk/tools/Debugger/GenericDebugger.Disassembler.cs index 133341652f..e5fb0b85c7 100644 --- a/BizHawk.Client.EmuHawk/tools/Debugger/GenericDebugger.Disassembler.cs +++ b/BizHawk.Client.EmuHawk/tools/Debugger/GenericDebugger.Disassembler.cs @@ -139,16 +139,12 @@ namespace BizHawk.Client.EmuHawk { if (e.Type == ScrollEventType.SmallIncrement) { - IncrementCurrentAddress(); - Disassemble(); - DisassemblerView.Refresh(); + SmallIncrement(); } if (e.Type == ScrollEventType.SmallDecrement) { - DecrementCurrentAddress(); - Disassemble(); - DisassemblerView.Refresh(); + SmallDecrement(); } } @@ -166,12 +162,34 @@ namespace BizHawk.Client.EmuHawk } } + private void SmallIncrement() + { + IncrementCurrentAddress(); + Disassemble(); + DisassemblerView.Refresh(); + } + + private void SmallDecrement() + { + DecrementCurrentAddress(); + Disassemble(); + DisassemblerView.Refresh(); + } + private void DisassemblerView_KeyDown(object sender, KeyEventArgs e) { if (e.Control && !e.Shift && !e.Alt && e.KeyCode == Keys.C) // Ctrl + C { CopySelectedDisassembler(); } + else if (!e.Control && !e.Shift && !e.Alt && e.KeyCode == Keys.PageDown) + { + SmallIncrement(); + } + else if (!e.Control && !e.Shift && !e.Alt && e.KeyCode == Keys.PageUp) + { + SmallDecrement(); + } } private void CopySelectedDisassembler()