UI: Set 8x8 as minimum selectable resolution

Since libobs internally rounds to various powers of 2 to support SSE
functions, resolutions that are too low can get rounded to zero. libobs
will fail to startup with a zero resolution, so if a user accidentally
entered anything that rounded to zero OBS would become unusable without
manual fixing by editing the profile .ini.
This commit is contained in:
Richard Stanway committed 2020-05-24 00:48:37 +02:00
1 parent 50e1d17615
commit 0a467085d2
2 files changed
+9 -4

No files matched your search

+3 -3
View File
@@ -3706,14 +3706,14 @@ int OBSBasic::ResetVideo()
ovi.gpu_conversion = true;
ovi.scale_type = GetScaleType(basicConfig);
if (ovi.base_width == 0 || ovi.base_height == 0) {
if (ovi.base_width < 8 || ovi.base_height < 8) {
ovi.base_width = 1920;
ovi.base_height = 1080;
config_set_uint(basicConfig, "Video", "BaseCX", 1920);
config_set_uint(basicConfig, "Video", "BaseCY", 1080);
}
if (ovi.output_width == 0 || ovi.output_height == 0) {
if (ovi.output_width < 8 || ovi.output_height < 8) {
ovi.output_width = ovi.base_width;
ovi.output_height = ovi.base_height;
config_set_uint(basicConfig, "Video", "OutputCX",
@@ -4727,7 +4727,7 @@ void OBSBasic::CreateSourcePopupMenu(int idx, bool preview)
resizeOutput->setEnabled(!obs_video_active());
if (width == 0 || height == 0)
if (width < 8 || height < 8)
resizeOutput->setEnabled(false);
scaleFilteringMenu = new QMenu(QTStr("ScaleFiltering"));