mirror of
https://github.com/zoriya/ComSquare.git
synced 2026-06-04 18:46:11 +00:00
Implementing a logger UI
This commit is contained in:
@@ -2,15 +2,14 @@
|
||||
// Created by anonymus-raccoon on 2/14/20.
|
||||
//
|
||||
|
||||
#include <iostream>
|
||||
#include "DebugCpu.hpp"
|
||||
|
||||
namespace ComSquare::Debugger
|
||||
{
|
||||
CPUDebug::CPUDebug(ComSquare::CPU::CPU &basicCPU, SNES &snes)
|
||||
: CPU::CPU(basicCPU), _snes(snes)
|
||||
: CPU::CPU(basicCPU), Ui::CPUView(), _snes(snes)
|
||||
{
|
||||
this->_ui.setupUi(&this->_widget);
|
||||
this->setupUi(&this->_widget);
|
||||
this->_widget.show();
|
||||
}
|
||||
|
||||
@@ -21,8 +20,7 @@ namespace ComSquare::Debugger
|
||||
return 0;
|
||||
}
|
||||
|
||||
// this->_renderer.drawScreen();
|
||||
// this->_renderer.getEvents();
|
||||
this->logger->append("Update");
|
||||
if (this->_isPaused)
|
||||
return 0xFF;
|
||||
return CPU::update();
|
||||
|
||||
@@ -14,12 +14,10 @@
|
||||
namespace ComSquare::Debugger
|
||||
{
|
||||
//! @brief A custom CPU with a window that show it's registers and the disassembly.
|
||||
class CPUDebug : public CPU::CPU {
|
||||
class CPUDebug : public CPU::CPU, Ui::CPUView {
|
||||
private:
|
||||
//! @brief A widget that contain the whole UI.
|
||||
QWidget _widget;
|
||||
//! @brief The ui that reside inside the window.
|
||||
Ui::CPU _ui;
|
||||
//! @brief If this is set to true, the execution of the CPU will be paused.
|
||||
bool _isPaused = true;
|
||||
//! @brief A reference to the snes (to disable the debugger).
|
||||
|
||||
Reference in New Issue
Block a user