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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user