Merge pull request #8745 from AdmiralCurtiss/savestate-load-callback-qt
Qt/Debugger: Refresh on savestate load.
This commit is contained in:
commit
bab04155b6
|
@ -30,6 +30,7 @@
|
||||||
#include "Core/PowerPC/PPCSymbolDB.h"
|
#include "Core/PowerPC/PPCSymbolDB.h"
|
||||||
#include "Core/PowerPC/PowerPC.h"
|
#include "Core/PowerPC/PowerPC.h"
|
||||||
#include "DolphinQt/Debugger/PatchInstructionDialog.h"
|
#include "DolphinQt/Debugger/PatchInstructionDialog.h"
|
||||||
|
#include "DolphinQt/Host.h"
|
||||||
#include "DolphinQt/Resources.h"
|
#include "DolphinQt/Resources.h"
|
||||||
#include "DolphinQt/Settings.h"
|
#include "DolphinQt/Settings.h"
|
||||||
|
|
||||||
|
@ -165,6 +166,10 @@ CodeViewWidget::CodeViewWidget()
|
||||||
m_address = PC;
|
m_address = PC;
|
||||||
Update();
|
Update();
|
||||||
});
|
});
|
||||||
|
connect(Host::GetInstance(), &Host::UpdateDisasmDialog, this, [this] {
|
||||||
|
m_address = PC;
|
||||||
|
Update();
|
||||||
|
});
|
||||||
|
|
||||||
connect(&Settings::Instance(), &Settings::ThemeChanged, this, &CodeViewWidget::Update);
|
connect(&Settings::Instance(), &Settings::ThemeChanged, this, &CodeViewWidget::Update);
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
#include "Core/PowerPC/PPCAnalyst.h"
|
#include "Core/PowerPC/PPCAnalyst.h"
|
||||||
#include "UICommon/Disassembler.h"
|
#include "UICommon/Disassembler.h"
|
||||||
|
|
||||||
|
#include "DolphinQt/Host.h"
|
||||||
#include "DolphinQt/Settings.h"
|
#include "DolphinQt/Settings.h"
|
||||||
|
|
||||||
JITWidget::JITWidget(QWidget* parent) : QDockWidget(parent)
|
JITWidget::JITWidget(QWidget* parent) : QDockWidget(parent)
|
||||||
|
@ -47,6 +48,7 @@ JITWidget::JITWidget(QWidget* parent) : QDockWidget(parent)
|
||||||
[this](bool enabled) { setHidden(!enabled || !Settings::Instance().IsJITVisible()); });
|
[this](bool enabled) { setHidden(!enabled || !Settings::Instance().IsJITVisible()); });
|
||||||
|
|
||||||
connect(&Settings::Instance(), &Settings::EmulationStateChanged, this, &JITWidget::Update);
|
connect(&Settings::Instance(), &Settings::EmulationStateChanged, this, &JITWidget::Update);
|
||||||
|
connect(Host::GetInstance(), &Host::UpdateDisasmDialog, this, &JITWidget::Update);
|
||||||
|
|
||||||
ConnectWidgets();
|
ConnectWidgets();
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
#include "Core/HW/AddressSpace.h"
|
#include "Core/HW/AddressSpace.h"
|
||||||
#include "Core/PowerPC/BreakPoints.h"
|
#include "Core/PowerPC/BreakPoints.h"
|
||||||
#include "Core/PowerPC/PowerPC.h"
|
#include "Core/PowerPC/PowerPC.h"
|
||||||
|
#include "DolphinQt/Host.h"
|
||||||
#include "DolphinQt/Resources.h"
|
#include "DolphinQt/Resources.h"
|
||||||
#include "DolphinQt/Settings.h"
|
#include "DolphinQt/Settings.h"
|
||||||
|
|
||||||
|
@ -37,6 +38,7 @@ MemoryViewWidget::MemoryViewWidget(QWidget* parent) : QTableWidget(parent)
|
||||||
|
|
||||||
connect(&Settings::Instance(), &Settings::DebugFontChanged, this, &QWidget::setFont);
|
connect(&Settings::Instance(), &Settings::DebugFontChanged, this, &QWidget::setFont);
|
||||||
connect(&Settings::Instance(), &Settings::EmulationStateChanged, this, [this] { Update(); });
|
connect(&Settings::Instance(), &Settings::EmulationStateChanged, this, [this] { Update(); });
|
||||||
|
connect(Host::GetInstance(), &Host::UpdateDisasmDialog, this, &MemoryViewWidget::Update);
|
||||||
connect(this, &MemoryViewWidget::customContextMenuRequested, this,
|
connect(this, &MemoryViewWidget::customContextMenuRequested, this,
|
||||||
&MemoryViewWidget::OnContextMenu);
|
&MemoryViewWidget::OnContextMenu);
|
||||||
connect(&Settings::Instance(), &Settings::ThemeChanged, this, &MemoryViewWidget::Update);
|
connect(&Settings::Instance(), &Settings::ThemeChanged, this, &MemoryViewWidget::Update);
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
#include "Core/ConfigManager.h"
|
#include "Core/ConfigManager.h"
|
||||||
#include "Core/HW/AddressSpace.h"
|
#include "Core/HW/AddressSpace.h"
|
||||||
#include "DolphinQt/Debugger/MemoryViewWidget.h"
|
#include "DolphinQt/Debugger/MemoryViewWidget.h"
|
||||||
|
#include "DolphinQt/Host.h"
|
||||||
#include "DolphinQt/QtUtils/ModalMessageBox.h"
|
#include "DolphinQt/QtUtils/ModalMessageBox.h"
|
||||||
#include "DolphinQt/Settings.h"
|
#include "DolphinQt/Settings.h"
|
||||||
|
|
||||||
|
@ -54,6 +55,7 @@ MemoryWidget::MemoryWidget(QWidget* parent) : QDockWidget(parent)
|
||||||
[this](bool enabled) { setHidden(!enabled || !Settings::Instance().IsMemoryVisible()); });
|
[this](bool enabled) { setHidden(!enabled || !Settings::Instance().IsMemoryVisible()); });
|
||||||
|
|
||||||
connect(&Settings::Instance(), &Settings::EmulationStateChanged, this, &MemoryWidget::Update);
|
connect(&Settings::Instance(), &Settings::EmulationStateChanged, this, &MemoryWidget::Update);
|
||||||
|
connect(Host::GetInstance(), &Host::UpdateDisasmDialog, this, &MemoryWidget::Update);
|
||||||
|
|
||||||
LoadSettings();
|
LoadSettings();
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
#include "Core/PowerPC/MMU.h"
|
#include "Core/PowerPC/MMU.h"
|
||||||
#include "Core/PowerPC/PowerPC.h"
|
#include "Core/PowerPC/PowerPC.h"
|
||||||
|
|
||||||
|
#include "DolphinQt/Host.h"
|
||||||
#include "DolphinQt/QtUtils/ModalMessageBox.h"
|
#include "DolphinQt/QtUtils/ModalMessageBox.h"
|
||||||
#include "DolphinQt/Resources.h"
|
#include "DolphinQt/Resources.h"
|
||||||
#include "DolphinQt/Settings.h"
|
#include "DolphinQt/Settings.h"
|
||||||
|
@ -49,6 +50,8 @@ WatchWidget::WatchWidget(QWidget* parent) : QDockWidget(parent)
|
||||||
Update();
|
Update();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
connect(Host::GetInstance(), &Host::UpdateDisasmDialog, this, &WatchWidget::Update);
|
||||||
|
|
||||||
connect(&Settings::Instance(), &Settings::WatchVisibilityChanged,
|
connect(&Settings::Instance(), &Settings::WatchVisibilityChanged,
|
||||||
[this](bool visible) { setHidden(!visible); });
|
[this](bool visible) { setHidden(!visible); });
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,7 @@
|
||||||
#include "Core/Host.h"
|
#include "Core/Host.h"
|
||||||
#include "Core/NetPlayProto.h"
|
#include "Core/NetPlayProto.h"
|
||||||
#include "Core/PowerPC/PowerPC.h"
|
#include "Core/PowerPC/PowerPC.h"
|
||||||
|
#include "Core/State.h"
|
||||||
|
|
||||||
#include "DolphinQt/QtUtils/QueueOnObject.h"
|
#include "DolphinQt/QtUtils/QueueOnObject.h"
|
||||||
#include "DolphinQt/Settings.h"
|
#include "DolphinQt/Settings.h"
|
||||||
|
@ -29,7 +30,15 @@
|
||||||
#include "VideoCommon/RenderBase.h"
|
#include "VideoCommon/RenderBase.h"
|
||||||
#include "VideoCommon/VideoConfig.h"
|
#include "VideoCommon/VideoConfig.h"
|
||||||
|
|
||||||
Host::Host() = default;
|
Host::Host()
|
||||||
|
{
|
||||||
|
State::SetOnAfterLoadCallback([this] { Host_UpdateDisasmDialog(); });
|
||||||
|
}
|
||||||
|
|
||||||
|
Host::~Host()
|
||||||
|
{
|
||||||
|
State::SetOnAfterLoadCallback(nullptr);
|
||||||
|
}
|
||||||
|
|
||||||
Host* Host::GetInstance()
|
Host* Host::GetInstance()
|
||||||
{
|
{
|
||||||
|
|
|
@ -18,6 +18,8 @@ class Host final : public QObject
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
~Host();
|
||||||
|
|
||||||
static Host* GetInstance();
|
static Host* GetInstance();
|
||||||
|
|
||||||
bool GetRenderFocus();
|
bool GetRenderFocus();
|
||||||
|
|
Loading…
Reference in New Issue