From ece8df2ace00cb73cf792f3810efc4628de31147 Mon Sep 17 00:00:00 2001 From: Ryan Foster Date: Wed, 23 Aug 2023 19:21:54 -0400 Subject: [PATCH] UI: Increase minimum output resolution to 32x32 Some hardware encoders fail in indecipherable ways if you try to at certain low resolutions such as 17x17 or 19x19, but works at 20x20. However, there is no good way to determine what the minimum working resolution is for every possible encoder. There isn't that much difference between 8x8 and 32x32, except that the latter will reduce or eliminate such odd failure cases, so let's increase the minimum required output resolution by just a little bit. --- UI/window-basic-main.cpp | 6 +++--- UI/window-basic-settings.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/UI/window-basic-main.cpp b/UI/window-basic-main.cpp index 1ef88d8fa..523253ac0 100644 --- a/UI/window-basic-main.cpp +++ b/UI/window-basic-main.cpp @@ -4742,14 +4742,14 @@ int OBSBasic::ResetVideo() ovi.gpu_conversion = true; ovi.scale_type = GetScaleType(basicConfig); - if (ovi.base_width < 8 || ovi.base_height < 8) { + if (ovi.base_width < 32 || ovi.base_height < 32) { 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 < 8 || ovi.output_height < 8) { + if (ovi.output_width < 32 || ovi.output_height < 32) { ovi.output_width = ovi.base_width; ovi.output_height = ovi.base_height; config_set_uint(basicConfig, "Video", "OutputCX", @@ -6038,7 +6038,7 @@ void OBSBasic::CreateSourcePopupMenu(int idx, bool preview) resizeOutput->setEnabled(!obs_video_active()); - if (width < 8 || height < 8) + if (width < 32 || height < 32) resizeOutput->setEnabled(false); scaleFilteringMenu = new QMenu(QTStr("ScaleFiltering")); diff --git a/UI/window-basic-settings.cpp b/UI/window-basic-settings.cpp index 3c33e7f45..bf3cd89c0 100644 --- a/UI/window-basic-settings.cpp +++ b/UI/window-basic-settings.cpp @@ -94,7 +94,7 @@ static inline bool ResTooHigh(uint32_t cx, uint32_t cy) static inline bool ResTooLow(uint32_t cx, uint32_t cy) { - return cx < 8 || cy < 8; + return cx < 32 || cy < 32; } /* parses "[width]x[height]", string, i.e. 1024x768 */