1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

screen texture and main window are now private members of screen handler

This commit is contained in:
Ivan Savenko
2025-02-10 18:00:42 +00:00
parent eb7587c000
commit 5a9dbc03a8
5 changed files with 7 additions and 11 deletions

View File

@@ -34,9 +34,7 @@
#include <SDL.h>
// TODO: should be made into a private members of ScreenHandler
static SDL_Window * mainWindow = nullptr;
SDL_Renderer * mainRenderer = nullptr;
SDL_Texture * screenTexture = nullptr;
static const std::string NAME = GameConstants::VCMI_VERSION; //application name
static constexpr Point heroes3Resolution = Point(800, 600);
@@ -633,7 +631,7 @@ void ScreenHandler::updateScreenTexture()
SDL_UpdateTexture(screenTexture, nullptr, screen->pixels, screen->pitch);
}
void ScreenHandler::presetScreenTexture()
void ScreenHandler::presentScreenTexture()
{
SDL_RenderClear(mainRenderer);
SDL_RenderCopy(mainRenderer, screenTexture, nullptr, nullptr);