mirror of
https://github.com/love2d/love.git
synced 2026-08-19 20:19:42 +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);
|
const char *str = luaL_checkstring(L, i);
|
||||||
if (!Graphics::getConstant(str, support))
|
if (!Graphics::getConstant(str, support))
|
||||||
{
|
return luaL_error(L, "Invalid graphics feature: %s", str);
|
||||||
supported = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
switch (support)
|
switch (support)
|
||||||
{
|
{
|
||||||
case Graphics::SUPPORT_CANVAS:
|
case Graphics::SUPPORT_CANVAS:
|
||||||
|
|||||||
Reference in New Issue
Block a user