Skip to content

Commit

Permalink
requesthandler: Fix resolution of screenshots of cropped sources
Browse files Browse the repository at this point in the history
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
  • Loading branch information
tt2468 committed Jun 6, 2024
1 parent 8c80e07 commit 5c3c4c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/requesthandler/RequestHandler_Sources.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5c3c4c7

Please sign in to comment.