Applied patch from issue #542 (texture filtering inconsistencies) in main LÖVE repository

This commit is contained in:
Alexander Szpakowski
2013-01-01 21:29:38 -04:00
parent a8dc813258
commit 1678252b7a
15 changed files with 315 additions and 204 deletions
@@ -601,8 +601,10 @@ int w_setDefaultImageFilter(lua_State *L)
{
Image::FilterMode min;
Image::FilterMode mag;
const char *minstr = luaL_checkstring(L, 1);
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))
@@ -611,6 +613,7 @@ int w_setDefaultImageFilter(lua_State *L)
Image::Filter f;
f.min = min;
f.mag = mag;
instance->setDefaultImageFilter(f);
return 0;