Allow zero arguments in love.graphics.setRenderTarget(), update boot.lua.h

Calling love.graphics.setRenderTarget() as opposed to
love.graphics.setRenderTarget( nil ) was an error before. fixed.
This commit is contained in:
vrld
2010-09-03 14:53:37 +02:00
parent 9afc5dfb08
commit 08c06f0fe0
2 changed files with 94 additions and 92 deletions
@@ -294,7 +294,7 @@ namespace opengl
int w_newFramebuffer(lua_State * L)
{
// check if width and height are given. else default to screen dimensions.
// check if width and height are given. else default to screen dimensions.
int width = instance->getWidth();
int height = instance->getHeight();
if (lua_gettop(L) >= 2) {
@@ -613,8 +613,8 @@ namespace opengl
int w_setRenderTarget(lua_State * L)
{
// called with nil -> reset to default buffer
if (lua_isnil(L, 1)) {
// called with nil or none -> reset to default buffer
if (lua_isnone(L,1) || lua_isnil(L, 1)) {
Framebuffer::bindDefaultBuffer();
return 0;
}