Fixed the color set by love.graphics.setColor not being restored properly when love.graphics.pop is called after love.graphics.push("all").

This commit is contained in:
Alex Szpakowski
2015-09-05 11:20:47 -03:00
parent 1c0870ee29
commit dc7cffe111
3 changed files with 23 additions and 15 deletions
+2 -3
View File
@@ -131,11 +131,10 @@ void Graphics::restoreStateChecked(const DisplayState &s)
{
const DisplayState &cur = states.back();
if (*(uint32 *) &s.color.r != *(uint32 *) &cur.color.r)
if (s.color != cur.color)
setColor(s.color);
if (*(uint32 *) &s.backgroundColor.r != *(uint32 *) &cur.backgroundColor.r)
setBackgroundColor(s.backgroundColor);
setBackgroundColor(s.backgroundColor);
if (s.blendMode != cur.blendMode || s.blendMultiplyAlpha != cur.blendMultiplyAlpha)
setBlendMode(s.blendMode, s.blendMultiplyAlpha);