mirror of
https://github.com/zoriya/ComSquare.git
synced 2025-12-20 14:15:11 +00:00
Merge branch 'master' of https://github.com/AnonymusRaccoon/ComSquare into APU
# Conflicts: # CMakeLists.txt
This commit is contained in:
@@ -11,18 +11,19 @@ using namespace ComSquare::APU;
|
||||
namespace ComSquare::Debugger
|
||||
{
|
||||
APUDebug::APUDebug(APU &apu, SNES &snes) :
|
||||
APU(apu),
|
||||
QMainWindow(),
|
||||
_ui(),
|
||||
_snes(snes)
|
||||
APU(apu),
|
||||
_window(new ClosableWindow(*this, &APUDebug::disableDebugger)),
|
||||
_ui(),
|
||||
_snes(snes)
|
||||
{
|
||||
this->setContextMenuPolicy(Qt::NoContextMenu);
|
||||
this->setAttribute(Qt::WA_QuitOnClose, false);
|
||||
this->_window->setContextMenuPolicy(Qt::NoContextMenu);
|
||||
this->_window->setAttribute(Qt::WA_QuitOnClose, false);
|
||||
this->_window->setAttribute(Qt::WA_DeleteOnClose);
|
||||
|
||||
this->_ui.setupUi(this);
|
||||
this->_ui.setupUi(this->_window);
|
||||
QMainWindow::connect(this->_ui.resumeButton, &QPushButton::clicked, this, &APUDebug::pause);
|
||||
QMainWindow::connect(this->_ui.stepButton, &QPushButton::clicked, this, &APUDebug::step);
|
||||
this->show();
|
||||
this->_window->show();
|
||||
this->_updatePanel();
|
||||
}
|
||||
|
||||
@@ -488,10 +489,6 @@ namespace ComSquare::Debugger
|
||||
void APUDebug::update(unsigned cycles)
|
||||
{
|
||||
try {
|
||||
if (!this->isVisible()) {
|
||||
this->_snes.disableAPUDebugging();
|
||||
return;
|
||||
}
|
||||
if (this->_isPaused)
|
||||
return;
|
||||
APU::update(cycles);
|
||||
@@ -515,4 +512,20 @@ namespace ComSquare::Debugger
|
||||
else
|
||||
this->_ui.resumeButton->setText("Pause");
|
||||
}
|
||||
|
||||
|
||||
void APUDebug::disableDebugger()
|
||||
{
|
||||
this->_snes.disableAPUDebugging();
|
||||
}
|
||||
|
||||
bool APUDebug::isDebugger()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
void APUDebug::focus()
|
||||
{
|
||||
this->_window->activateWindow();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user