mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-01-29 04:27:50 +01:00
Fix gfx.drawPixel being unable to draw in event.AFTERSIMDRAW
It somehow never got the upgrade where a drawing primitive looks at the current event context and chooses a graphics backend based on it. All the others primitive got it in c5b72b213baa.
This commit is contained in:
parent
080f059da9
commit
118786e39b
@ -71,8 +71,9 @@ static int drawPixel(lua_State *L)
|
||||
else if (b > 255) b = 255;
|
||||
if (a < 0 ) a = 0 ;
|
||||
else if (a > 255) a = 255;
|
||||
auto *lsi = GetLSI();
|
||||
lsi->g->BlendPixel({ x, y }, RGBA<uint8_t>(r, g, b, a));
|
||||
std::visit([x, y, r, g, b, a](auto p) {
|
||||
p->BlendPixel({ x, y }, RGBA<uint8_t>(r, g, b, a));
|
||||
}, currentGraphics());
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user