diff options
Diffstat (limited to 'src/citra_qt/debugger/graphics/graphics_breakpoint_observer.cpp')
| -rw-r--r-- | src/citra_qt/debugger/graphics/graphics_breakpoint_observer.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/citra_qt/debugger/graphics/graphics_breakpoint_observer.cpp b/src/citra_qt/debugger/graphics/graphics_breakpoint_observer.cpp new file mode 100644 index 000000000..dc6070dea --- /dev/null +++ b/src/citra_qt/debugger/graphics/graphics_breakpoint_observer.cpp | |||
| @@ -0,0 +1,27 @@ | |||
| 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 | #include "citra_qt/debugger/graphics/graphics_breakpoint_observer.h" | ||
| 7 | |||
| 8 | BreakPointObserverDock::BreakPointObserverDock(std::shared_ptr<Pica::DebugContext> debug_context, | ||
| 9 | const QString& title, QWidget* parent) | ||
| 10 | : QDockWidget(title, parent), BreakPointObserver(debug_context) { | ||
| 11 | qRegisterMetaType<Pica::DebugContext::Event>("Pica::DebugContext::Event"); | ||
| 12 | |||
| 13 | connect(this, SIGNAL(Resumed()), this, SLOT(OnResumed())); | ||
| 14 | |||
| 15 | // NOTE: This signal is emitted from a non-GUI thread, but connect() takes | ||
| 16 | // care of delaying its handling to the GUI thread. | ||
| 17 | connect(this, SIGNAL(BreakPointHit(Pica::DebugContext::Event, void*)), this, | ||
| 18 | SLOT(OnBreakPointHit(Pica::DebugContext::Event, void*)), Qt::BlockingQueuedConnection); | ||
| 19 | } | ||
| 20 | |||
| 21 | void BreakPointObserverDock::OnPicaBreakPointHit(Pica::DebugContext::Event event, void* data) { | ||
| 22 | emit BreakPointHit(event, data); | ||
| 23 | } | ||
| 24 | |||
| 25 | void BreakPointObserverDock::OnPicaResume() { | ||
| 26 | emit Resumed(); | ||
| 27 | } | ||