fix: add D3D11 fallback for gpu-api on Windows

This commit is contained in:
edde746
2026-03-11 13:54:21 +01:00
parent 307fd354d6
commit b4471fab49
+2 -2
View File
@@ -37,9 +37,9 @@ bool MpvPlayer::Initialize(HWND container, HWND flutter_window) {
mpv_set_option(mpv_, "wid", MPV_FORMAT_INT64, &wid);
// Configure mpv for embedded playback.
// Use gpu-next + Vulkan to avoid D3D11 driver crashes (GH-653)
// Use gpu-next with Vulkan preferred, D3D11 fallback (GH-653, GH-672)
mpv_set_option_string(mpv_, "vo", "gpu-next");
mpv_set_option_string(mpv_, "gpu-api", "vulkan");
mpv_set_option_string(mpv_, "gpu-api", "vulkan,d3d11");
// hwdec is set from Flutter via setProperty based on user preference
mpv_set_option_string(mpv_, "keep-open", "yes");
mpv_set_option_string(mpv_, "idle", "yes");