diff --git a/client/adventureMap/AdventureMapInterface.cpp b/client/adventureMap/AdventureMapInterface.cpp index c98911b14..96c1864c6 100644 --- a/client/adventureMap/AdventureMapInterface.cpp +++ b/client/adventureMap/AdventureMapInterface.cpp @@ -171,7 +171,9 @@ void AdventureMapInterface::dim(Canvas & to) std::shared_ptr casted = std::dynamic_pointer_cast(window); if (!casted && !window->isPopupWindow()) { - to.drawColor(Rect(0, 0, GH.screenDimensions().x, GH.screenDimensions().y), ColorRGBA(0, 0, 0, std::clamp(settings["adventure"]["backgroundDimLevel"].Integer(), 0, 255))); + Rect targetRect(0, 0, GH.screenDimensions().x, GH.screenDimensions().y); + ColorRGBA colorToFill(0, 0, 0, std::clamp(settings["adventure"]["backgroundDimLevel"].Integer(), 0, 255)); + to.drawColor(targetRect, colorToFill); return; } }