mirror of https://github.com/mpv-player/mpv
d3d11: make --alpha runtime changeable
The DWM compositor transparency API is runtime changeable. Handle this in update_render_opts.
This commit is contained in:
parent
117622cd4a
commit
8de67a4af5
|
@ -512,6 +512,11 @@ error:
|
|||
return false;
|
||||
}
|
||||
|
||||
static void d3d11_update_render_opts(struct ra_ctx *ctx)
|
||||
{
|
||||
vo_w32_set_transparency(ctx->vo, ctx->opts.want_alpha);
|
||||
}
|
||||
|
||||
IDXGISwapChain *ra_d3d11_ctx_get_swapchain(struct ra_ctx *ra)
|
||||
{
|
||||
if (ra->swapchain->fns != &d3d11_swapchain)
|
||||
|
@ -535,10 +540,11 @@ bool ra_d3d11_ctx_prefer_8bit_output_format(struct ra_ctx *ra)
|
|||
}
|
||||
|
||||
const struct ra_ctx_fns ra_ctx_d3d11 = {
|
||||
.type = "d3d11",
|
||||
.name = "d3d11",
|
||||
.reconfig = d3d11_reconfig,
|
||||
.control = d3d11_control,
|
||||
.init = d3d11_init,
|
||||
.uninit = d3d11_uninit,
|
||||
.type = "d3d11",
|
||||
.name = "d3d11",
|
||||
.reconfig = d3d11_reconfig,
|
||||
.control = d3d11_control,
|
||||
.update_render_opts = d3d11_update_render_opts,
|
||||
.init = d3d11_init,
|
||||
.uninit = d3d11_uninit,
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue