From 0f98893f288f55436702c6dc53d941e54169f9c9 Mon Sep 17 00:00:00 2001 From: fgenesis Date: Wed, 8 May 2024 04:39:59 +0200 Subject: [PATCH] Don't render the dark layer when its corresponding tile layer is hidden. This would have the old (as it was last updated when visible) dark layer stuck on the screen. Regression from 09edbf49fd09b95d2 --- Aquaria/DSQ.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Aquaria/DSQ.cpp b/Aquaria/DSQ.cpp index 59ac59c..a3b135a 100644 --- a/Aquaria/DSQ.cpp +++ b/Aquaria/DSQ.cpp @@ -713,8 +713,14 @@ static bool beginAfterEffectCapture(const RenderState& rs) static bool preRenderAfterEffectLayer(const RenderState& rs) { - if(core->darkLayer.isUsed()) + if(core->darkLayer.isUsed() + // LR_DARK_LAYER is remapped to LR_ELEMENTS13 via renderLayerOrder, + // need to actually check LR_DARK_LAYER here + && core->getRenderObjectLayer(LR_DARK_LAYER)->visible + ) + { core->darkLayer.render(rs); + } if(core->afterEffectManager) {