diff options
| author | Gamer64 <gamer64@eden-emu.dev> | 2025-08-02 17:22:38 +0200 |
|---|---|---|
| committer | crueter <crueter@eden-emu.dev> | 2025-08-02 17:22:38 +0200 |
| commit | 1f34d836b4fb37997e58958630fee5ffb3a678ec (patch) | |
| tree | ac46676957a3f45876609da027cb6c1a4e191164 /src/yuzu/debugger/profiler.cpp | |
| parent | b32a667d6fcb069f2ba92d08fc82778c39b036d7 (diff) | |
Add cmake option to enable microprofile (#179)
Backported from https://github.com/azahar-emu/azahar/commit/dd9c743041308112c8dc349c5c237c04b2c4c75f.
Co-authored-by: PabloMK7 <hackyglitch2@gmail.com>
Co-authored-by: Shinmegumi <shinmegumi@eden-emu.dev>
Co-authored-by: Gamer64 <76565986+Gamer64ytb@users.noreply.github.com>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/179
Co-authored-by: Gamer64 <gamer64@eden-emu.dev>
Co-committed-by: Gamer64 <gamer64@eden-emu.dev>
Diffstat (limited to 'src/yuzu/debugger/profiler.cpp')
| -rw-r--r-- | src/yuzu/debugger/profiler.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/yuzu/debugger/profiler.cpp b/src/yuzu/debugger/profiler.cpp index 493ee0b178..55d4298fa6 100644 --- a/src/yuzu/debugger/profiler.cpp +++ b/src/yuzu/debugger/profiler.cpp @@ -1,6 +1,11 @@ +// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + // SPDX-FileCopyrightText: 2015 Citra Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later +#if MICROPROFILE_ENABLED + #include <QAction> #include <QLayout> #include <QMouseEvent> @@ -14,7 +19,7 @@ // 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" @@ -43,8 +48,6 @@ private: qreal x_scale = 1.0, y_scale = 1.0; }; -#endif - MicroProfileDialog::MicroProfileDialog(QWidget* parent) : QWidget(parent, Qt::Dialog) { setObjectName(QStringLiteral("MicroProfile")); setWindowTitle(tr("&MicroProfile")); @@ -52,8 +55,6 @@ MicroProfileDialog::MicroProfileDialog(QWidget* parent) : QWidget(parent, Qt::Di // Enable the maximize button setWindowFlags(windowFlags() | Qt::WindowMaximizeButtonHint); -#if MICROPROFILE_ENABLED - MicroProfileWidget* widget = new MicroProfileWidget(this); QLayout* layout = new QVBoxLayout(this); @@ -66,7 +67,6 @@ MicroProfileDialog::MicroProfileDialog(QWidget* parent) : QWidget(parent, Qt::Di setFocusProxy(widget); widget->setFocusPolicy(Qt::StrongFocus); widget->setFocus(); -#endif } QAction* MicroProfileDialog::toggleViewAction() { @@ -94,8 +94,6 @@ 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; |
