diff options
author | dec05eba <dec05eba@protonmail.com> | 2025-03-13 01:38:26 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2025-03-13 01:38:26 +0100 |
commit | af5468410376f6b8cb3a0c6e3fb46636e03299f8 (patch) | |
tree | d43bc60461ae593831f3e717bb74266315441c55 /src/capture/xcomposite.c | |
parent | 92492db788e97db028176c942e9aed047f8f152a (diff) |
Fix screenshot with region not working correctly for some sizes and possibly crashing
Diffstat (limited to 'src/capture/xcomposite.c')
-rw-r--r-- | src/capture/xcomposite.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/capture/xcomposite.c b/src/capture/xcomposite.c index 94e691b..2016a31 100644 --- a/src/capture/xcomposite.c +++ b/src/capture/xcomposite.c @@ -113,12 +113,11 @@ static int gsr_capture_xcomposite_start(gsr_capture *cap, gsr_capture_metadata * self->params.egl->glBindTexture(GL_TEXTURE_2D, 0); if(self->params.output_resolution.x == 0 && self->params.output_resolution.y == 0) { - self->params.output_resolution = self->texture_size; - capture_metadata->width = FFALIGN(self->texture_size.x, 2); - capture_metadata->height = FFALIGN(self->texture_size.y, 2); + capture_metadata->width = self->texture_size.x; + capture_metadata->height = self->texture_size.y; } else { - capture_metadata->width = FFALIGN(self->params.output_resolution.x, 2); - capture_metadata->height = FFALIGN(self->params.output_resolution.y, 2); + capture_metadata->width = self->params.output_resolution.x; + capture_metadata->height = self->params.output_resolution.y; } self->fast_path_failed = self->params.egl->gpu_info.vendor == GSR_GPU_VENDOR_AMD && !gl_driver_version_greater_than(&self->params.egl->gpu_info, 24, 0, 9); |