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
This commit is contained in:
tt2468 2024-06-05 23:34:04 -07:00
parent 8c80e0745a
commit 5c3c4c76c8

View File

@ -28,8 +28,8 @@ with this program. If not, see <https://www.gnu.org/licenses/>
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;