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.h | |
| 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.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 | }; | ||