From 08f2374b4454392cfbf98d4dcdc672e01d82ff04 Mon Sep 17 00:00:00 2001 From: "Chris (Flaeri)" Date: Tue, 28 Jan 2025 07:24:45 +0000 Subject: [PATCH] frontend: Round up Resize Output (Source Size) This is to ensure usable resolutions, and conform to existing paradigms. See https://github.com/obsproject/obs-studio/commit/21ec81ebcc43e465160fcc880e4088c64d407a23 --- frontend/widgets/OBSBasic_OutputHandler.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frontend/widgets/OBSBasic_OutputHandler.cpp b/frontend/widgets/OBSBasic_OutputHandler.cpp index aa1778f53..4eada1942 100644 --- a/frontend/widgets/OBSBasic_OutputHandler.cpp +++ b/frontend/widgets/OBSBasic_OutputHandler.cpp @@ -76,6 +76,9 @@ void OBSBasic::ResizeOutputSizeOfSource() int width = obs_source_get_width(source); int height = obs_source_get_height(source); + width = ((width + 3) / 4) * 4; // Round width up to the nearest multiple of 4 + height = ((height + 1) / 2) * 2; // Round height up to the nearest multiple of 2 + config_set_uint(activeConfiguration, "Video", "BaseCX", width); config_set_uint(activeConfiguration, "Video", "BaseCY", height); config_set_uint(activeConfiguration, "Video", "OutputCX", width);