mirror of https://github.com/bjornbytes/lovr.git
Fix lovr.graphics.getBlendMode when blending is off;
This commit is contained in:
parent
26d009aada
commit
a0b2200bef
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue