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