summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKacper Michajłow <kasper93@gmail.com>2024-03-06 05:42:28 +0100
committersfan5 <sfan5@live.de>2024-03-17 14:28:00 +0100
commit16e3d7dca69bb2a8c0fb6a9ff527d036349d07fc (patch)
tree0b7ff138f9dabf66eb947346f6f593855d9e5a6e
parent2b0c7b1aa4a9fcc2cc44458bc00963675074748a (diff)
downloadmpv-16e3d7dca69bb2a8c0fb6a9ff527d036349d07fc.tar.bz2
mpv-16e3d7dca69bb2a8c0fb6a9ff527d036349d07fc.tar.xz
d3d11: get real on the wire bits per color channel
-rw-r--r--video/out/d3d11/context.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/video/out/d3d11/context.c b/video/out/d3d11/context.c
index f374f6e710..c563b5fa15 100644
--- a/video/out/d3d11/context.c
+++ b/video/out/d3d11/context.c
@@ -154,6 +154,11 @@ static bool d3d11_reconfig(struct ra_ctx *ctx)
static int d3d11_color_depth(struct ra_swapchain *sw)
{
struct priv *p = sw->priv;
+
+ DXGI_OUTPUT_DESC1 desc1;
+ if (mp_get_dxgi_output_desc(p->swapchain, &desc1))
+ return desc1.BitsPerColor;
+
DXGI_SWAP_CHAIN_DESC desc;
HRESULT hr = IDXGISwapChain_GetDesc(p->swapchain, &desc);