clear persistent effects when it's display mode is removed

This commit is contained in:
jacob1 2013-01-25 23:15:33 -05:00
parent 1d97f1c985
commit 46b767da0c

View File

@ -2630,9 +2630,14 @@ std::vector<unsigned int> Renderer::GetRenderMode()
void Renderer::CompileDisplayMode() void Renderer::CompileDisplayMode()
{ {
int old_display_mode = display_mode;
display_mode = 0; display_mode = 0;
for(int i = 0; i < display_modes.size(); i++) for(int i = 0; i < display_modes.size(); i++)
display_mode |= display_modes[i]; display_mode |= display_modes[i];
if(!(display_mode & DISPLAY_PERS) && (old_display_mode & DISPLAY_PERS))
{
ClearAccumulation();
}
} }
void Renderer::AddDisplayMode(unsigned int mode) void Renderer::AddDisplayMode(unsigned int mode)