From 92a655c8b90c62255bcd3fcc160e240c98f79217 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Sat, 6 Jul 2019 10:50:11 +0200 Subject: 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. --- Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp') diff --git a/Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp b/Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp index 2427101cb7..d413bb0cd0 100644 --- a/Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp +++ b/Source/Core/DolphinQt/Debugger/CodeViewWidget.cpp @@ -92,6 +92,9 @@ void CodeViewWidget::FontBasedSizing() void CodeViewWidget::Update() { + if (!isVisible()) + return; + if (m_updating) return; @@ -568,6 +571,11 @@ void CodeViewWidget::mousePressEvent(QMouseEvent* event) } } +void CodeViewWidget::showEvent(QShowEvent* event) +{ + Update(); +} + void CodeViewWidget::ToggleBreakpoint() { if (PowerPC::debug_interface.IsBreakpoint(GetContextAddress())) -- cgit v1.2.3