compiling but segfault when opening the tileviewer

This commit is contained in:
Clément Le Bihan
2021-07-25 23:42:48 +02:00
parent c9ae519e22
commit 29636dc8e9
5 changed files with 32 additions and 7 deletions
+3 -3
View File
@@ -23,8 +23,8 @@ namespace ComSquare::Debugger
_ramTileRenderer(ppu.vram, ppu.cgram)
{
this->_ui.setupUi(this->_window);
this->_qtSfmlRenderer(this->_ui.widget_sfml, 30);
this->_renderer = this->_qtSfmlRenderer;
//this->_qtSfmlRenderer(this->_ui.widget_sfml, 30);
this->_renderer = std::make_unique<Renderer::QtSFMLTileRenderer>(this->_ui.widget_sfml, 30);;
// this->_sfWidget = std::make_unique<Renderer::QtSFMLTileRenderer>(this->_ui.widget_sfml);
QMainWindow::connect(this->_ui.NbColumns, QOverload<int>::of(&QSpinBox::valueChanged), this,
[this](int nb) -> void { this->setNbColumns(nb); });
@@ -116,7 +116,7 @@ namespace ComSquare::Debugger
int j = 0;
for (const auto &row : this->_ramTileRenderer.buffer) {
for (const auto &pixel : row) {
this->_renderer.putPixel(j++, i, pixel);
this->_renderer->putPixel(j++, i, pixel);
}
j = 0;
i++;