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:
nanahi 2024-01-02 16:44:14 -05:00 committed by Dudemanguy
parent cef378b0a3
commit a61026aec3
1 changed files with 3 additions and 0 deletions

View File

@ -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)