From 561bc18f49b0f18abc69eab39b55ed9ffcd94c0e Mon Sep 17 00:00:00 2001 From: zuiyu <1542844298@qq.com> Date: Thu, 6 Mar 2025 09:49:04 +0800 Subject: [PATCH] Fix unused import with dxgiformat (#11032) --- libs/scrap/src/dxgi/mod.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/scrap/src/dxgi/mod.rs b/libs/scrap/src/dxgi/mod.rs index 9220fa605..a9d1af85c 100644 --- a/libs/scrap/src/dxgi/mod.rs +++ b/libs/scrap/src/dxgi/mod.rs @@ -7,7 +7,6 @@ use winapi::{ shared::{ dxgi::*, dxgi1_2::*, - dxgiformat::DXGI_FORMAT_B8G8R8A8_UNORM, dxgitype::*, minwindef::{DWORD, FALSE, TRUE, UINT}, ntdef::LONG, @@ -118,6 +117,7 @@ impl Capturer { } else { hres } + // NVFBC(NVIDIA Capture SDK) which xpra used already deprecated, https://developer.nvidia.com/capture-sdk // also try high version DXGI for better performance, e.g. @@ -129,6 +129,8 @@ impl Capturer { // can help us update screen incrementally /* // not supported on my PC, try in the future + use winapi::shared::dxgiformat::DXGI_FORMAT_B8G8R8A8_UNORM; + let format : Vec = vec![DXGI_FORMAT_B8G8R8A8_UNORM, DXGI_FORMAT_420_OPAQUE]; (*display.inner).DuplicateOutput1( device as *mut _,