summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--video/out/vo_gpu_next.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/video/out/vo_gpu_next.c b/video/out/vo_gpu_next.c
index 10a16a5f4f..e48ba4032f 100644
--- a/video/out/vo_gpu_next.c
+++ b/video/out/vo_gpu_next.c
@@ -1124,11 +1124,14 @@ static void video_screenshot(struct vo *vo, struct voctrl_screenshot *args)
struct mp_rect src = p->src, dst = p->dst;
struct mp_osd_res osd = p->osd_res;
if (!args->scaled) {
- src = dst = (struct mp_rect) {0, 0, mpi->params.w, mpi->params.h};
+ int w = mpi->params.w, h = mpi->params.h;
+ if (mpi->params.rotate % 180 == 90)
+ MPSWAP(int, w, h);
+ src = dst = (struct mp_rect) {0, 0, w, h};
osd = (struct mp_osd_res) {
- .w = mpi->params.w,
- .h = mpi->params.h,
.display_par = 1.0,
+ .w = w,
+ .h = h,
};
}