mirror of
https://github.com/love2d/love.git
synced 2026-08-15 15:51:12 +02:00
Make second argument to setDefaultImageFilter Image:setFilter and Image:setWrap optional, and default to the first
This commit is contained in:
@@ -589,7 +589,7 @@ int w_setDefaultImageFilter(lua_State *L)
|
||||
Image::FilterMode min;
|
||||
Image::FilterMode mag;
|
||||
const char *minstr = luaL_checkstring(L, 1);
|
||||
const char *magstr = luaL_checkstring(L, 2);
|
||||
const char *magstr = luaL_optstring(L, 2, minstr);
|
||||
if (!Image::getConstant(minstr, min))
|
||||
return luaL_error(L, "Invalid filter mode: %s", minstr);
|
||||
if (!Image::getConstant(magstr, mag))
|
||||
|
||||
Reference in New Issue
Block a user