diff options
| author | JosJuice <josjuice@gmail.com> | 2019-07-06 10:50:11 +0200 |
|---|---|---|
| committer | JosJuice <josjuice@gmail.com> | 2019-07-06 11:30:17 +0200 |
| commit | 92a655c8b90c62255bcd3fcc160e240c98f79217 (patch) | |
| tree | 8c3fbc41272e1ffb63bdd2315668fd573a386489 /Source/Core/DolphinQt/Debugger/JITWidget.cpp | |
| parent | 0a7395bfba99719f71de5186a9916e66c1901f37 (diff) | |
DolphinQt: Don't update debug widgets when hidden
Saves on CPU usage when pausing/unpausing with the debugger disabled.
This is especially important when using frame advance rapidly.
Diffstat (limited to 'Source/Core/DolphinQt/Debugger/JITWidget.cpp')
| -rw-r--r-- | Source/Core/DolphinQt/Debugger/JITWidget.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Source/Core/DolphinQt/Debugger/JITWidget.cpp b/Source/Core/DolphinQt/Debugger/JITWidget.cpp index 1ba4bc3bbd..c233f49d98 100644 --- a/Source/Core/DolphinQt/Debugger/JITWidget.cpp +++ b/Source/Core/DolphinQt/Debugger/JITWidget.cpp @@ -57,8 +57,6 @@ JITWidget::JITWidget(QWidget* parent) : QDockWidget(parent) #else m_disassembler = GetNewDisassembler("UNK"); #endif - - Update(); } JITWidget::~JITWidget() @@ -126,6 +124,9 @@ void JITWidget::Compare(u32 address) void JITWidget::Update() { + if (!isVisible()) + return; + if (!m_address) { m_ppc_asm_widget->setHtml(QStringLiteral("<i>%1</i>").arg(tr("(ppc)"))); @@ -208,3 +209,8 @@ void JITWidget::closeEvent(QCloseEvent*) { Settings::Instance().SetJITVisible(false); } + +void JITWidget::showEvent(QShowEvent* event) +{ + Update(); +} |
