diff options
author | sfan5 <sfan5@live.de> | 2021-12-19 01:39:48 +0100 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2021-12-19 01:44:52 +0100 |
commit | c8b6dc489baf21b3945fabfb069be884c53e138a (patch) | |
tree | 2042c3d5a075749b16ef31e2b90b8224302373a9 /video/out | |
parent | e79cd6227b710fe602b9ed6a8e87c095b4a2a933 (diff) | |
download | mpv-c8b6dc489baf21b3945fabfb069be884c53e138a.tar.bz2 mpv-c8b6dc489baf21b3945fabfb069be884c53e138a.tar.xz |
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.
Diffstat (limited to 'video/out')
-rw-r--r-- | video/out/vo.h | 2 | ||||
-rw-r--r-- | video/out/vo_gpu_next.c | 4 |
2 files changed, 5 insertions, 1 deletions
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; |