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.
This commit is contained in:
jp9000 2015-10-22 17:40:18 -07:00
parent 0be0eedc81
commit 83630fa14a

View File

@ -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;