mirror of https://github.com/mpv-player/mpv
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.
This commit is contained in:
parent
e79cd6227b
commit
c8b6dc489b
|
@ -122,7 +122,7 @@ enum mp_voctrl {
|
||||||
VOCTRL_GET_HIDPI_SCALE, // double*
|
VOCTRL_GET_HIDPI_SCALE, // double*
|
||||||
VOCTRL_GET_DISPLAY_RES, // int[2]
|
VOCTRL_GET_DISPLAY_RES, // int[2]
|
||||||
|
|
||||||
/* private to vo_gpu */
|
/* private to vo_gpu and vo_gpu_next */
|
||||||
VOCTRL_EXTERNAL_RESIZE,
|
VOCTRL_EXTERNAL_RESIZE,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1040,6 +1040,10 @@ static int control(struct vo *vo, uint32_t request, void *data)
|
||||||
case VOCTRL_SCREENSHOT:
|
case VOCTRL_SCREENSHOT:
|
||||||
video_screenshot(vo, data);
|
video_screenshot(vo, data);
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
case VOCTRL_EXTERNAL_RESIZE:
|
||||||
|
reconfig(vo, NULL);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
int events = 0;
|
int events = 0;
|
||||||
|
|
Loading…
Reference in New Issue