1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-04 05:32:54 +01:00

Fix stray pixels showing up when panning and moving a windows

This commit is contained in:
ζeh Matt
2025-04-25 17:46:30 +03:00
parent 12063aa884
commit e2d9a44a5d

View File

@@ -361,16 +361,20 @@ public:
void PaintWindows() override
{
WindowResetVisibilities();
WindowUpdateAllViewports();
if (ClimateIsRaining() || ClimateIsSnowing() || ClimateIsSnowingHeavily())
{
WindowUpdateAllViewports();
// OpenGL doesn't support restoring pixels, always redraw.
// TODO: Render the weather to a texture and use that instead.
WindowDrawAll(_bitsDPI, 0, 0, static_cast<int32_t>(_width), static_cast<int32_t>(_height));
}
else
{
// Redraw dirty regions before updating the viewports, otherwise
// when viewports get panned, they copy dirty pixels
DrawAllDirtyBlocks();
WindowUpdateAllViewports();
DrawAllDirtyBlocks();
}
}