Enforce minimum source size for the preview window

Otherwise sources that return 0 width/height trigger errors in
gs_setviewport
master
Palana 2014-04-28 21:52:07 +02:00
parent 7114f65d18
commit 98a256c8eb
1 changed files with 2 additions and 2 deletions

View File

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