Browse Source

libobs/graphics: Safely fail gs_texrender_begin with 0,0 size

Passing 0,0 texture size should be considered legal, and safely return
false to indicate that rendering can't begin.  Also there's no need to
try to use the current swap chain's width/height if either of the sizes
are 0, there's no need try try to "force" success here anymore.
jp9000 10 years ago
parent
commit
83630fa14a
1 changed files with 0 additions and 6 deletions
  1. 0 6
      libobs/graphics/texture-render.c

+ 0 - 6
libobs/graphics/texture-render.c

@@ -92,12 +92,6 @@ bool gs_texrender_begin(gs_texrender_t *texrender, uint32_t cx, uint32_t cy)
 	if (!texrender || texrender->rendered)
 		return false;
 
-	if (cx == 0)
-		cx = gs_get_width();
-	if (cy == 0)
-		cy = gs_get_height();
-
-	assert(cx && cy);
 	if (!cx || !cy)
 		return false;