mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-13 00:58:29 +02:00
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.
This commit is contained in:
@ -64,8 +64,6 @@ CodeWidget::CodeWidget(QWidget* parent) : QDockWidget(parent)
|
||||
settings.value(QStringLiteral("codewidget/codesplitter")).toByteArray());
|
||||
m_box_splitter->restoreState(
|
||||
settings.value(QStringLiteral("codewidget/boxsplitter")).toByteArray());
|
||||
|
||||
Update();
|
||||
}
|
||||
|
||||
CodeWidget::~CodeWidget()
|
||||
@ -83,6 +81,11 @@ void CodeWidget::closeEvent(QCloseEvent*)
|
||||
Settings::Instance().SetCodeVisible(false);
|
||||
}
|
||||
|
||||
void CodeWidget::showEvent(QShowEvent* event)
|
||||
{
|
||||
Update();
|
||||
}
|
||||
|
||||
void CodeWidget::CreateWidgets()
|
||||
{
|
||||
auto* layout = new QGridLayout;
|
||||
@ -265,6 +268,9 @@ void CodeWidget::SetAddress(u32 address, CodeViewWidget::SetAddressUpdate update
|
||||
|
||||
void CodeWidget::Update()
|
||||
{
|
||||
if (!isVisible())
|
||||
return;
|
||||
|
||||
const Common::Symbol* symbol = g_symbolDB.GetSymbolFromAddr(m_code_view->GetAddress());
|
||||
|
||||
UpdateCallstack();
|
||||
|
Reference in New Issue
Block a user