1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-18 04:23:20 +01:00

Clear the screen with color in the drawing engine and not each tick

This commit is contained in:
ζeh Matt
2024-08-01 00:20:26 +03:00
parent 3e9a7bda83
commit 348df5a986
4 changed files with 4 additions and 5 deletions

View File

@@ -158,6 +158,8 @@ public:
_screenTextureFormat = SDL_AllocFormat(format);
ConfigureBits(width, height, width);
_drawingContext->Clear(_bitsDPI, PALETTE_INDEX_10);
}
void SetPalette(const GamePalette& palette) override

View File

@@ -245,6 +245,7 @@ public:
ConfigureBits(width, height, width);
ConfigureCanvas();
_drawingContext->Resize(width, height);
_drawingContext->Clear(_bitsDPI, PALETTE_INDEX_10);
}
void SetPalette(const GamePalette& palette) override

View File

@@ -139,6 +139,7 @@ void X8DrawingEngine::Resize(uint32_t width, uint32_t height)
{
uint32_t pitch = width;
ConfigureBits(width, height, pitch);
_drawingContext->Clear(_bitsDPI, PALETTE_INDEX_10);
}
void X8DrawingEngine::SetPalette([[maybe_unused]] const GamePalette& palette)

View File

@@ -52,11 +52,6 @@ void PreloaderScene::Tick()
ContextHandleInput();
WindowInvalidateAll();
// Reset screen
auto* engine = GetContext().GetDrawingEngine();
auto* drawingContext = engine->GetDrawingContext();
drawingContext->Clear(*engine->GetDrawingPixelInfo(), PALETTE_INDEX_10);
gInUpdateCode = false;
if (_jobs.CountPending() == 0 && _jobs.CountProcessing() == 0)