1. Bart van Strien
  2. love-experiments

Commits

Alex Szpakowski  committed db4e384

Really fixed setScissor erroring when scissoring is disabled and x,y,w,h from getScissor is used (see issue #709)

  • Participants
  • Parent commits d42d107
  • Branches default

Comments (0)

Files changed (1)

File src/modules/graphics/opengl/wrap_Graphics.cpp

View file
  • Ignore whitespace
 
 int w_setScissor(lua_State *L)
 {
-	if (lua_gettop(L) <= 1 && lua_isnoneornil(L, 1))
+	int nargs = lua_gettop(L);
+
+	if (nargs == 0 || (nargs == 4 && lua_isnil(L, 1) && lua_isnil(L, 2)
+		&& lua_isnil(L, 3) && lua_isnil(L, 4)))
 	{
 		instance->setScissor();
 		return 0;