mirror of
https://github.com/love2d/love.git
synced 2026-08-15 15:51:12 +02:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user