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:
parent
0be0eedc81
commit
83630fa14a
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user