diff options
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 | } | ||