mirror of
https://github.com/love2d/love.git
synced 2026-08-16 08:11:02 +02:00
love get* APIs which return tables with fields can optionally accept a table argument to fill in, instead of creating a new table.
--HG-- branch : minor
This commit is contained in:
@@ -171,7 +171,10 @@ int w_getMode(lua_State *L)
|
||||
lua_pushnumber(L, w);
|
||||
lua_pushnumber(L, h);
|
||||
|
||||
lua_newtable(L);
|
||||
if (lua_istable(L, 1))
|
||||
lua_pushvalue(L, 1);
|
||||
else
|
||||
lua_newtable(L);
|
||||
|
||||
const char *fstypestr = "desktop";
|
||||
Window::getConstant(settings.fstype, fstypestr);
|
||||
|
||||
Reference in New Issue
Block a user