mirror of
https://github.com/zoriya/ComSquare.git
synced 2025-12-20 06:05:11 +00:00
Cleaning up and making the debugger resize well
This commit is contained in:
@@ -16,14 +16,17 @@
|
||||
namespace ComSquare::Renderer
|
||||
{
|
||||
QtSFML::QtSFML(unsigned int h, unsigned int w) :
|
||||
QtWindow(h, w), _sfWidget(nullptr)
|
||||
{ }
|
||||
_window(), _sfWidget(nullptr)
|
||||
{
|
||||
this->_window.resize(w, h);
|
||||
}
|
||||
|
||||
void QtSFML::createWindow(SNES &snes, int maxFPS)
|
||||
{
|
||||
this->setWindowName(snes.cartridge->header.gameName);
|
||||
this->_sfWidget = std::make_unique<QtFullSFML>(snes, &_frame, QPoint(0, 0), QSize(this->_width, this->_height), maxFPS);
|
||||
this->_sfWidget->show();
|
||||
this->_sfWidget = std::make_unique<QtFullSFML>(snes, &_window, QPoint(0, 0), QSize(this->_window.width(), this->_window.height()), maxFPS);
|
||||
this->_sfWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||
this->_window.show();
|
||||
}
|
||||
|
||||
void QtSFML::putPixel(unsigned y, unsigned x, uint32_t rgba)
|
||||
@@ -35,7 +38,7 @@ namespace ComSquare::Renderer
|
||||
|
||||
void QtSFML::setWindowName(std::string &newWindowName)
|
||||
{
|
||||
QtWindow::setWindowName(newWindowName);
|
||||
this->_window.setWindowTitle((newWindowName + " - ComSquare").c_str());
|
||||
}
|
||||
|
||||
QtFullSFML::QtFullSFML(SNES &snes, QWidget *parent, const QPoint &position, const QSize &size, int frameRate) :
|
||||
|
||||
Reference in New Issue
Block a user