From 5c3c4c76c8d8b4d00d45face465e05b04ff7ddf5 Mon Sep 17 00:00:00 2001 From: tt2468 Date: Wed, 5 Jun 2024 23:34:04 -0700 Subject: [PATCH] requesthandler: Fix resolution of screenshots of cropped sources This applies the same fix found in obsproject/obs-studio#10077 to get the target source's real width and height, not the width and height values from the pre-filter stage. Closes #1213 --- src/requesthandler/RequestHandler_Sources.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/requesthandler/RequestHandler_Sources.cpp b/src/requesthandler/RequestHandler_Sources.cpp index 459901ce..bc246a8f 100644 --- a/src/requesthandler/RequestHandler_Sources.cpp +++ b/src/requesthandler/RequestHandler_Sources.cpp @@ -28,8 +28,8 @@ with this program. If not, see QImage TakeSourceScreenshot(obs_source_t *source, bool &success, uint32_t requestedWidth = 0, uint32_t requestedHeight = 0) { // Get info about the requested source - const uint32_t sourceWidth = obs_source_get_base_width(source); - const uint32_t sourceHeight = obs_source_get_base_height(source); + const uint32_t sourceWidth = obs_source_get_width(source); + const uint32_t sourceHeight = obs_source_get_height(source); const double sourceAspectRatio = ((double)sourceWidth / (double)sourceHeight); uint32_t imgWidth = sourceWidth;