diff options
Diffstat (limited to 'src/citra_qt/debugger/graphics_breakpoint_observer.h')
| -rw-r--r-- | src/citra_qt/debugger/graphics_breakpoint_observer.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/citra_qt/debugger/graphics_breakpoint_observer.h b/src/citra_qt/debugger/graphics_breakpoint_observer.h new file mode 100644 index 000000000..f0d3361f8 --- /dev/null +++ b/src/citra_qt/debugger/graphics_breakpoint_observer.h | |||
| @@ -0,0 +1,33 @@ | |||
| 1 | // Copyright 2014 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #pragma once | ||
| 6 | |||
| 7 | #include <QDockWidget> | ||
| 8 | |||
| 9 | #include "video_core/debug_utils/debug_utils.h" | ||
| 10 | |||
| 11 | /** | ||
| 12 | * Utility class which forwards calls to OnPicaBreakPointHit and OnPicaResume to public slots. | ||
| 13 | * This is because the Pica breakpoint callbacks are called from a non-GUI thread, while | ||
| 14 | * the widget usually wants to perform reactions in the GUI thread. | ||
| 15 | */ | ||
| 16 | class BreakPointObserverDock : public QDockWidget, private Pica::DebugContext::BreakPointObserver { | ||
| 17 | Q_OBJECT | ||
| 18 | |||
| 19 | public: | ||
| 20 | BreakPointObserverDock(std::shared_ptr<Pica::DebugContext> debug_context, const QString& title, | ||
| 21 | QWidget* parent = nullptr); | ||
| 22 | |||
| 23 | void OnPicaBreakPointHit(Pica::DebugContext::Event event, void* data) override; | ||
| 24 | void OnPicaResume() override; | ||
| 25 | |||
| 26 | private slots: | ||
| 27 | virtual void OnBreakPointHit(Pica::DebugContext::Event event, void* data) = 0; | ||
| 28 | virtual void OnResumed() = 0; | ||
| 29 | |||
| 30 | signals: | ||
| 31 | void Resumed(); | ||
| 32 | void BreakPointHit(Pica::DebugContext::Event event, void* data); | ||
| 33 | }; | ||