diff options
| author | Dolphin Bot <dolphin-emu-bot@users.noreply.github.com> | 2014-07-16 03:53:53 +0200 |
|---|---|---|
| committer | Dolphin Bot <dolphin-emu-bot@users.noreply.github.com> | 2014-07-16 03:53:53 +0200 |
| commit | 57a4bfb8358ae067f2044d572a613244c69e3ad3 (patch) | |
| tree | 4484cff2d7e0c460f0ca523d4efac84979243158 /Source/Core/DolphinWX/Debugger/CodeView.cpp | |
| parent | dda7a5ad1c83be8350fba39deaa04a6ca72dde86 (diff) | |
| parent | 9c1b427687e6760b227d164af1ff6cbcbb047bdd (diff) | |
Merge pull request #631 from lioncash/scrolling
DolphinWX: Implement scrolling in the code view and DSP disassembly view.
Diffstat (limited to 'Source/Core/DolphinWX/Debugger/CodeView.cpp')
| -rw-r--r-- | Source/Core/DolphinWX/Debugger/CodeView.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Source/Core/DolphinWX/Debugger/CodeView.cpp b/Source/Core/DolphinWX/Debugger/CodeView.cpp index 0b725e75d4..d7e06e4585 100644 --- a/Source/Core/DolphinWX/Debugger/CodeView.cpp +++ b/Source/Core/DolphinWX/Debugger/CodeView.cpp @@ -56,6 +56,7 @@ enum BEGIN_EVENT_TABLE(CCodeView, wxControl) EVT_ERASE_BACKGROUND(CCodeView::OnErase) EVT_PAINT(CCodeView::OnPaint) + EVT_MOUSEWHEEL(CCodeView::OnScrollWheel) EVT_LEFT_DOWN(CCodeView::OnMouseDown) EVT_LEFT_UP(CCodeView::OnMouseUpL) EVT_MOTION(CCodeView::OnMouseMove) @@ -114,6 +115,24 @@ void CCodeView::OnMouseDown(wxMouseEvent& event) event.Skip(); } +void CCodeView::OnScrollWheel(wxMouseEvent& event) +{ + const bool scroll_down = (event.GetWheelRotation() < 0); + const int num_lines = event.GetLinesPerAction(); + + if (scroll_down) + { + curAddress += num_lines; + } + else + { + curAddress -= num_lines; + } + + Refresh(); + event.Skip(); +} + void CCodeView::ToggleBreakpoint(u32 address) { debugger->ToggleBreakpoint(address); |
