From a61026aec30102ae3f2f119253f73c9db8747937 Mon Sep 17 00:00:00 2001 From: nanahi <130121847+na-na-hi@users.noreply.github.com> Date: Tue, 2 Jan 2024 16:44:14 -0500 Subject: [PATCH] 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. --- video/out/d3d11/context.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/video/out/d3d11/context.c b/video/out/d3d11/context.c index 82e385031b..7549d4804a 100644 --- a/video/out/d3d11/context.c +++ b/video/out/d3d11/context.c @@ -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)