Enforce minimum source size for the preview window
Otherwise sources that return 0 width/height trigger errors in gs_setviewport
This commit is contained in:
parent
7114f65d18
commit
98a256c8eb
1 changed files with 2 additions and 2 deletions
|
|
@ -74,8 +74,8 @@ void OBSBasicProperties::DrawPreview(void *data, uint32_t cx, uint32_t cy)
|
|||
if (!window->source)
|
||||
return;
|
||||
|
||||
uint32_t sourceCX = obs_source_getwidth(window->source);
|
||||
uint32_t sourceCY = obs_source_getheight(window->source);
|
||||
uint32_t sourceCX = max(obs_source_getwidth(window->source), 1u);
|
||||
uint32_t sourceCY = max(obs_source_getheight(window->source), 1u);
|
||||
|
||||
int x, y;
|
||||
int newCX, newCY;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue