Fix lovr.graphics.getBlendMode when blending is off;

This commit is contained in:
bjorn 2021-02-19 14:05:18 -07:00
parent 26d009aada
commit a0b2200bef
1 changed files with 4 additions and 0 deletions

View File

@ -615,6 +615,10 @@ static int l_lovrGraphicsGetBlendMode(lua_State* L) {
BlendMode mode;
BlendAlphaMode alphaMode;
lovrGraphicsGetBlendMode(&mode, &alphaMode);
if (mode == BLEND_NONE) {
lua_pushnil(L);
return 1;
}
luax_pushenum(L, BlendMode, mode);
luax_pushenum(L, BlendAlphaMode, alphaMode);
return 2;