mirror of
https://github.com/love2d/love.git
synced 2026-08-17 11:00:31 +02:00
Cleaned up getting wrap and filter modes for Images.
This commit is contained in:
@@ -73,10 +73,8 @@ namespace opengl
|
|||||||
Image::FilterMode mag = f.mag;
|
Image::FilterMode mag = f.mag;
|
||||||
const char * minstr;
|
const char * minstr;
|
||||||
const char * magstr;
|
const char * magstr;
|
||||||
if (!Image::getConstant(min, minstr))
|
Image::getConstant(min, minstr);
|
||||||
return luaL_error(L, "Invalid filter mode: %s", minstr);
|
Image::getConstant(mag, magstr);
|
||||||
if (!Image::getConstant(mag, magstr))
|
|
||||||
return luaL_error(L, "Invalid filter mode: %s", magstr);
|
|
||||||
lua_pushstring(L, minstr);
|
lua_pushstring(L, minstr);
|
||||||
lua_pushstring(L, magstr);
|
lua_pushstring(L, magstr);
|
||||||
return 2;
|
return 2;
|
||||||
@@ -109,10 +107,8 @@ namespace opengl
|
|||||||
Image::WrapMode t = w.t;
|
Image::WrapMode t = w.t;
|
||||||
const char * sstr;
|
const char * sstr;
|
||||||
const char * tstr;
|
const char * tstr;
|
||||||
if (!Image::getConstant(s, sstr))
|
Image::getConstant(s, sstr);
|
||||||
return luaL_error(L, "Invalid filter mode: %s", sstr);
|
Image::getConstant(t, tstr);
|
||||||
if (!Image::getConstant(t, tstr))
|
|
||||||
return luaL_error(L, "Invalid filter mode: %s", tstr);
|
|
||||||
lua_pushstring(L, sstr);
|
lua_pushstring(L, sstr);
|
||||||
lua_pushstring(L, tstr);
|
lua_pushstring(L, tstr);
|
||||||
return 2;
|
return 2;
|
||||||
|
|||||||
Reference in New Issue
Block a user