mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-01 05:38:50 +00:00
Qt/debugger: properly updates when we break
The Host_UpdateDisasmDialog was unimplemented in Qt which is required to get updates when we break. Additionally, this updates the debugger toolbar.
This commit is contained in:
parent
70ca98c8e7
commit
238c801711
9 changed files with 80 additions and 29 deletions
|
@ -8,6 +8,7 @@
|
|||
#include <QIcon>
|
||||
|
||||
#include "Core/Core.h"
|
||||
#include "DolphinQt2/Host.h"
|
||||
#include "DolphinQt2/QtUtils/ActionHelper.h"
|
||||
#include "DolphinQt2/Resources.h"
|
||||
#include "DolphinQt2/Settings.h"
|
||||
|
@ -33,6 +34,9 @@ ToolBar::ToolBar(QWidget* parent) : QToolBar(parent)
|
|||
connect(&Settings::Instance(), &Settings::EmulationStateChanged, this,
|
||||
[this](Core::State state) { OnEmulationStateChanged(state); });
|
||||
|
||||
connect(Host::GetInstance(), &Host::UpdateDisasmDialog, this,
|
||||
[this] { OnEmulationStateChanged(Core::GetState()); });
|
||||
|
||||
connect(&Settings::Instance(), &Settings::DebugModeToggled, this, &ToolBar::OnDebugModeToggled);
|
||||
|
||||
connect(&Settings::Instance(), &Settings::ToolBarVisibilityChanged, this, &ToolBar::setVisible);
|
||||
|
@ -56,6 +60,13 @@ void ToolBar::OnEmulationStateChanged(Core::State state)
|
|||
m_play_action->setVisible(!playing);
|
||||
m_pause_action->setEnabled(playing);
|
||||
m_pause_action->setVisible(playing);
|
||||
|
||||
bool paused = Core::GetState() == Core::State::Paused;
|
||||
m_step_action->setEnabled(paused);
|
||||
m_step_over_action->setEnabled(paused);
|
||||
m_step_out_action->setEnabled(paused);
|
||||
m_skip_action->setEnabled(paused);
|
||||
m_set_pc_action->setEnabled(paused);
|
||||
}
|
||||
|
||||
void ToolBar::closeEvent(QCloseEvent*)
|
||||
|
@ -71,6 +82,13 @@ void ToolBar::OnDebugModeToggled(bool enabled)
|
|||
m_skip_action->setVisible(enabled);
|
||||
m_show_pc_action->setVisible(enabled);
|
||||
m_set_pc_action->setVisible(enabled);
|
||||
|
||||
bool paused = Core::GetState() == Core::State::Paused;
|
||||
m_step_action->setEnabled(paused);
|
||||
m_step_over_action->setEnabled(paused);
|
||||
m_step_out_action->setEnabled(paused);
|
||||
m_skip_action->setEnabled(paused);
|
||||
m_set_pc_action->setEnabled(paused);
|
||||
}
|
||||
|
||||
void ToolBar::MakeActions()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue