summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornanahi <130121847+na-na-hi@users.noreply.github.com>2024-01-02 16:44:14 -0500
committerDudemanguy <random342@airmail.cc>2024-02-17 16:06:33 +0000
commita61026aec30102ae3f2f119253f73c9db8747937 (patch)
treed3a14c7415bec558ceeafca4e2c88ab19fe18c65
parentcef378b0a3a18aea04fd1dd2b3762525e15a1878 (diff)
downloadmpv-a61026aec30102ae3f2f119253f73c9db8747937.tar.bz2
mpv-a61026aec30102ae3f2f119253f73c9db8747937.tar.xz
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.
-rw-r--r--video/out/d3d11/context.c3
1 files changed, 3 insertions, 0 deletions
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)