Fix unused import with dxgiformat (#11032)

This commit is contained in:
zuiyu
2025-03-06 09:49:04 +08:00
committed by GitHub
parent 6946b863f7
commit 561bc18f49

View File

@@ -7,7 +7,6 @@ use winapi::{
shared::{ shared::{
dxgi::*, dxgi::*,
dxgi1_2::*, dxgi1_2::*,
dxgiformat::DXGI_FORMAT_B8G8R8A8_UNORM,
dxgitype::*, dxgitype::*,
minwindef::{DWORD, FALSE, TRUE, UINT}, minwindef::{DWORD, FALSE, TRUE, UINT},
ntdef::LONG, ntdef::LONG,
@@ -118,6 +117,7 @@ impl Capturer {
} else { } else {
hres hres
} }
// NVFBC(NVIDIA Capture SDK) which xpra used already deprecated, https://developer.nvidia.com/capture-sdk // 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. // also try high version DXGI for better performance, e.g.
@@ -129,6 +129,8 @@ impl Capturer {
// can help us update screen incrementally // can help us update screen incrementally
/* // not supported on my PC, try in the future /* // not supported on my PC, try in the future
use winapi::shared::dxgiformat::DXGI_FORMAT_B8G8R8A8_UNORM;
let format : Vec<DXGI_FORMAT> = vec![DXGI_FORMAT_B8G8R8A8_UNORM, DXGI_FORMAT_420_OPAQUE]; let format : Vec<DXGI_FORMAT> = vec![DXGI_FORMAT_B8G8R8A8_UNORM, DXGI_FORMAT_420_OPAQUE];
(*display.inner).DuplicateOutput1( (*display.inner).DuplicateOutput1(
device as *mut _, device as *mut _,