Do not override global blitter to render overlay/plans to cache buffer

Creates thread safety issues with active draw jobs
This commit is contained in:
Jonathan G Rennison
2024-02-04 01:29:22 +00:00
parent 816d4eb657
commit 4a9803c6f0
6 changed files with 63 additions and 55 deletions

View File

@@ -27,6 +27,7 @@
#include "zoom_func.h"
#include "object_map.h"
#include "newgrf_object.h"
#include "blitter/factory.hpp"
#include "smallmap_colours.h"
#include "smallmap_gui.h"
@@ -1007,7 +1008,7 @@ void SmallMapWindow::DrawSmallMap(DrawPixelInfo *dpi, bool draw_indicators) cons
/* Draw link stat overlay */
if (this->map_type == SMT_LINKSTATS) {
this->overlay->PrepareDraw();
this->overlay->Draw(dpi);
this->overlay->Draw(BlitterFactory::GetCurrentBlitter(), dpi);
}
/* Draw town names */