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)

Comments (0)

Files changed (1)

src/modules/graphics/opengl/wrap_Graphics.cpp

 
 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;
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.