mirror of
https://github.com/zoriya/ComSquare.git
synced 2025-12-20 06:05:11 +00:00
Updating the app to use QT
This commit is contained in:
@@ -12,18 +12,22 @@
|
||||
|
||||
namespace ComSquare::Renderer
|
||||
{
|
||||
SFRenderer::SFRenderer(unsigned int height, unsigned int width, int maxFPS)
|
||||
SFRenderer::SFRenderer(unsigned int height, unsigned int width)
|
||||
{
|
||||
sf::Image icon;
|
||||
this->shouldExit = false;
|
||||
this->_videoMode = {width, height, 32};
|
||||
this->_texture.create(width, height);
|
||||
this->_sprite.setTexture(this->_texture);
|
||||
this->_pixelBuffer = new sf::Color[height * width];
|
||||
}
|
||||
|
||||
void SFRenderer::createWindow(SNES &, int maxFPS)
|
||||
{
|
||||
sf::Image icon;
|
||||
this->_window.create(this->_videoMode, "ComSquare Emulator", sf::Style::Default);
|
||||
if (icon.loadFromFile("../ressources/Logo.png"))
|
||||
this->_window.setIcon(314, 314, icon.getPixelsPtr());
|
||||
this->_window.setFramerateLimit(maxFPS);
|
||||
this->_texture.create(width, height);
|
||||
this->_sprite.setTexture(this->_texture);
|
||||
this->_pixelBuffer = new sf::Color[height * width];
|
||||
}
|
||||
|
||||
SFRenderer::~SFRenderer()
|
||||
@@ -31,7 +35,6 @@ namespace ComSquare::Renderer
|
||||
delete [] this->_pixelBuffer;
|
||||
}
|
||||
|
||||
|
||||
void SFRenderer::setWindowName(std::string newWindowName)
|
||||
{
|
||||
this->_window.setTitle(newWindowName + " - ComSquare");
|
||||
@@ -70,5 +73,4 @@ namespace ComSquare::Renderer
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user