diff options
| author | 2014-12-19 19:22:44 +0100 | |
|---|---|---|
| committer | 2015-02-11 15:40:04 +0100 | |
| commit | 3f649dc9b806c733db079df82fbd6558d189ef4e (patch) | |
| tree | 0d8bce3a673bd8f1f61703bccfaa5df56eec0478 /src/citra_qt/debugger/graphics_breakpoint_observer.cpp | |
| parent | Merge pull request #500 from archshift/assert (diff) | |
| download | yuzu-3f649dc9b806c733db079df82fbd6558d189ef4e.tar.gz yuzu-3f649dc9b806c733db079df82fbd6558d189ef4e.tar.xz yuzu-3f649dc9b806c733db079df82fbd6558d189ef4e.zip | |
Pica/DebugUtils: Factor out BreakPointObserverDock into its own file.
Diffstat (limited to 'src/citra_qt/debugger/graphics_breakpoint_observer.cpp')
| -rw-r--r-- | src/citra_qt/debugger/graphics_breakpoint_observer.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/citra_qt/debugger/graphics_breakpoint_observer.cpp b/src/citra_qt/debugger/graphics_breakpoint_observer.cpp new file mode 100644 index 000000000..10ac1ebad --- /dev/null +++ b/src/citra_qt/debugger/graphics_breakpoint_observer.cpp | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | // Copyright 2014 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #include <QMetaType> | ||
| 6 | |||
| 7 | #include "graphics_breakpoint_observer.h" | ||
| 8 | |||
| 9 | BreakPointObserverDock::BreakPointObserverDock(std::shared_ptr<Pica::DebugContext> debug_context, | ||
| 10 | const QString& title, QWidget* parent) | ||
| 11 | : QDockWidget(title, parent), BreakPointObserver(debug_context) | ||
| 12 | { | ||
| 13 | qRegisterMetaType<Pica::DebugContext::Event>("Pica::DebugContext::Event"); | ||
| 14 | |||
| 15 | connect(this, SIGNAL(Resumed()), this, SLOT(OnResumed())); | ||
| 16 | |||
| 17 | // NOTE: This signal is emitted from a non-GUI thread, but connect() takes | ||
| 18 | // care of delaying its handling to the GUI thread. | ||
| 19 | connect(this, SIGNAL(BreakPointHit(Pica::DebugContext::Event,void*)), | ||
| 20 | this, SLOT(OnBreakPointHit(Pica::DebugContext::Event,void*)), | ||
| 21 | Qt::BlockingQueuedConnection); | ||
| 22 | } | ||
| 23 | |||
| 24 | void BreakPointObserverDock::OnPicaBreakPointHit(Pica::DebugContext::Event event, void* data) | ||
| 25 | { | ||
| 26 | emit BreakPointHit(event, data); | ||
| 27 | } | ||
| 28 | |||
| 29 | void BreakPointObserverDock::OnPicaResume() | ||
| 30 | { | ||
| 31 | emit Resumed(); | ||
| 32 | } | ||