mirror of
https://github.com/love2d/love.git
synced 2026-08-16 08:11:02 +02:00
love.graphics.isSupported now errors if an invalid string is given (see issue #690)
This commit is contained in:
@@ -1051,10 +1051,8 @@ int w_isSupported(lua_State *L)
|
||||
{
|
||||
const char *str = luaL_checkstring(L, i);
|
||||
if (!Graphics::getConstant(str, support))
|
||||
{
|
||||
supported = false;
|
||||
break;
|
||||
}
|
||||
return luaL_error(L, "Invalid graphics feature: %s", str);
|
||||
|
||||
switch (support)
|
||||
{
|
||||
case Graphics::SUPPORT_CANVAS:
|
||||
|
||||
Reference in New Issue
Block a user