mirror of
https://github.com/zoriya/ComSquare.git
synced 2025-12-20 06:05:11 +00:00
Cleaning up all debuggers
This commit is contained in:
@@ -12,15 +12,16 @@ namespace ComSquare::Debugger
|
||||
{
|
||||
APUDebug::APUDebug(APU &apu, SNES &snes) :
|
||||
APU(apu),
|
||||
QMainWindow(),
|
||||
_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->show();
|
||||
this->_ui.setupUi(this->_window);
|
||||
this->_window->show();
|
||||
this->_updatePanel();
|
||||
}
|
||||
|
||||
@@ -479,10 +480,21 @@ namespace ComSquare::Debugger
|
||||
|
||||
void APUDebug::update(unsigned cycles)
|
||||
{
|
||||
if (!this->isVisible()) {
|
||||
this->_snes.disableAPUDebugging();
|
||||
return;
|
||||
}
|
||||
return APU::update(cycles);
|
||||
}
|
||||
|
||||
void APUDebug::disableDebugger()
|
||||
{
|
||||
this->_snes.disableAPUDebugging();
|
||||
}
|
||||
|
||||
bool APUDebug::isDebugger()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
void APUDebug::focus()
|
||||
{
|
||||
this->_window->activateWindow();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user