mirror of https://github.com/mpv-player/mpv
d3d11: set window to transparent if --alpha=yes is specified
This makes --alpha=yes work with d3d11 and --d3d11-flip=no. transparent window doesn't work with flip model swapchain by design.
This commit is contained in:
parent
cef378b0a3
commit
a61026aec3
|
@ -479,6 +479,9 @@ static bool d3d11_init(struct ra_ctx *ctx)
|
|||
if (!vo_w32_init(ctx->vo))
|
||||
goto error;
|
||||
|
||||
if (ctx->opts.want_alpha)
|
||||
vo_w32_set_transparency(ctx->vo, ctx->opts.want_alpha);
|
||||
|
||||
UINT usage = DXGI_USAGE_RENDER_TARGET_OUTPUT | DXGI_USAGE_SHADER_INPUT;
|
||||
if (ID3D11Device_GetFeatureLevel(p->device) >= D3D_FEATURE_LEVEL_11_0 &&
|
||||
p->opts->output_format != DXGI_FORMAT_B8G8R8A8_UNORM)
|
||||
|
|
Loading…
Reference in New Issue