diff options
author | Henrik Rydgård <hrydgard@gmail.com> | 2016-04-29 02:17:31 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2016-04-29 02:17:31 +0200 |
commit | 90501f20e6b91fcd2beaccf0b1a0174b189da09c (patch) | |
tree | 9f909f9402d09e9a6175d37383aece363baba2f9 /src/citra_qt/debugger/profiler.cpp | |
parent | Merge pull request #1727 from MerryMage/minor-commit (diff) | |
download | yuzu-90501f20e6b91fcd2beaccf0b1a0174b189da09c.tar yuzu-90501f20e6b91fcd2beaccf0b1a0174b189da09c.tar.gz yuzu-90501f20e6b91fcd2beaccf0b1a0174b189da09c.tar.bz2 yuzu-90501f20e6b91fcd2beaccf0b1a0174b189da09c.tar.lz yuzu-90501f20e6b91fcd2beaccf0b1a0174b189da09c.tar.xz yuzu-90501f20e6b91fcd2beaccf0b1a0174b189da09c.tar.zst yuzu-90501f20e6b91fcd2beaccf0b1a0174b189da09c.zip |
Diffstat (limited to 'src/citra_qt/debugger/profiler.cpp')
-rw-r--r-- | src/citra_qt/debugger/profiler.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/citra_qt/debugger/profiler.cpp b/src/citra_qt/debugger/profiler.cpp index 4f6ba0e1f..e90973b8e 100644 --- a/src/citra_qt/debugger/profiler.cpp +++ b/src/citra_qt/debugger/profiler.cpp @@ -14,8 +14,10 @@ // Include the implementation of the UI in this file. This isn't in microprofile.cpp because the // non-Qt frontends don't need it (and don't implement the UI drawing hooks either). +#if MICROPROFILE_ENABLED #define MICROPROFILEUI_IMPL 1 #include "common/microprofileui.h" +#endif using namespace Common::Profiling; @@ -148,6 +150,8 @@ void ProfilerWidget::setProfilingInfoUpdateEnabled(bool enable) } } +#if MICROPROFILE_ENABLED + class MicroProfileWidget : public QWidget { public: MicroProfileWidget(QWidget* parent = nullptr); @@ -171,6 +175,8 @@ private: QTimer update_timer; }; +#endif + MicroProfileDialog::MicroProfileDialog(QWidget* parent) : QWidget(parent, Qt::Dialog) { @@ -180,6 +186,8 @@ MicroProfileDialog::MicroProfileDialog(QWidget* parent) // Remove the "?" button from the titlebar and enable the maximize button setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint | Qt::WindowMaximizeButtonHint); +#if MICROPROFILE_ENABLED + MicroProfileWidget* widget = new MicroProfileWidget(this); QLayout* layout = new QVBoxLayout(this); @@ -191,6 +199,7 @@ MicroProfileDialog::MicroProfileDialog(QWidget* parent) setFocusProxy(widget); widget->setFocusPolicy(Qt::StrongFocus); widget->setFocus(); +#endif } QAction* MicroProfileDialog::toggleViewAction() { @@ -218,6 +227,9 @@ void MicroProfileDialog::hideEvent(QHideEvent* ev) { QWidget::hideEvent(ev); } + +#if MICROPROFILE_ENABLED + /// There's no way to pass a user pointer to MicroProfile, so this variable is used to make the /// QPainter available inside the drawing callbacks. static QPainter* mp_painter = nullptr; @@ -337,3 +349,4 @@ void MicroProfileDrawLine2D(u32 vertices_length, float* vertices, u32 hex_color) mp_painter->drawPolyline(point_buf.data(), vertices_length); point_buf.clear(); } +#endif |