From 46b767da0c14745a6cd807637249ec0b5b57b8f1 Mon Sep 17 00:00:00 2001 From: jacob1 Date: Fri, 25 Jan 2013 23:15:33 -0500 Subject: [PATCH] clear persistent effects when it's display mode is removed --- src/graphics/Renderer.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/graphics/Renderer.cpp b/src/graphics/Renderer.cpp index 14a64be26..50c9ba47a 100644 --- a/src/graphics/Renderer.cpp +++ b/src/graphics/Renderer.cpp @@ -2630,9 +2630,14 @@ std::vector Renderer::GetRenderMode() void Renderer::CompileDisplayMode() { + int old_display_mode = display_mode; display_mode = 0; for(int i = 0; i < display_modes.size(); i++) display_mode |= display_modes[i]; + if(!(display_mode & DISPLAY_PERS) && (old_display_mode & DISPLAY_PERS)) + { + ClearAccumulation(); + } } void Renderer::AddDisplayMode(unsigned int mode)