提交 98a256c8 编写于 作者: P Palana

Enforce minimum source size for the preview window

Otherwise sources that return 0 width/height trigger errors in
gs_setviewport
上级 7114f65d
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册