Skip to content

Commit 5c3c4c7

Browse files
committed
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
1 parent 8c80e07 commit 5c3c4c7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/requesthandler/RequestHandler_Sources.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ with this program. If not, see <https://www.gnu.org/licenses/>
2828
QImage TakeSourceScreenshot(obs_source_t *source, bool &success, uint32_t requestedWidth = 0, uint32_t requestedHeight = 0)
2929
{
3030
// Get info about the requested source
31-
const uint32_t sourceWidth = obs_source_get_base_width(source);
32-
const uint32_t sourceHeight = obs_source_get_base_height(source);
31+
const uint32_t sourceWidth = obs_source_get_width(source);
32+
const uint32_t sourceHeight = obs_source_get_height(source);
3333
const double sourceAspectRatio = ((double)sourceWidth / (double)sourceHeight);
3434

3535
uint32_t imgWidth = sourceWidth;

0 commit comments

Comments
 (0)