From c8b6dc489baf21b3945fabfb069be884c53e138a Mon Sep 17 00:00:00 2001 From: sfan5 Date: Sun, 19 Dec 2021 01:39:48 +0100 Subject: vo_gpu_next: implement VOCTRL_EXTERNAL_RESIZE This is only needed on Android and supposed to handle a context resize without reconfiguring the image parameters. reconfig() already does exactly this so plug it in there. --- video/out/vo.h | 2 +- video/out/vo_gpu_next.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/video/out/vo.h b/video/out/vo.h index 7ab19a96f1..a8e8b9ddaf 100644 --- a/video/out/vo.h +++ b/video/out/vo.h @@ -122,7 +122,7 @@ enum mp_voctrl { VOCTRL_GET_HIDPI_SCALE, // double* VOCTRL_GET_DISPLAY_RES, // int[2] - /* private to vo_gpu */ + /* private to vo_gpu and vo_gpu_next */ VOCTRL_EXTERNAL_RESIZE, }; diff --git a/video/out/vo_gpu_next.c b/video/out/vo_gpu_next.c index d6e9cffd1f..6fc0a8c29c 100644 --- a/video/out/vo_gpu_next.c +++ b/video/out/vo_gpu_next.c @@ -1040,6 +1040,10 @@ static int control(struct vo *vo, uint32_t request, void *data) case VOCTRL_SCREENSHOT: video_screenshot(vo, data); return true; + + case VOCTRL_EXTERNAL_RESIZE: + reconfig(vo, NULL); + return true; } int events = 0; -- cgit v1.2.3