Fix Windows DXGI output descriptor API and enable Win32_Graphics_Gdi feature
This commit is contained in:
parent
89b670bcfc
commit
19dc591f19
3 changed files with 4 additions and 4 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
|
@ -4506,7 +4506,7 @@ dependencies = [
|
|||
"serde",
|
||||
"serde_json",
|
||||
"tokio",
|
||||
"windows 0.62.2",
|
||||
"windows 0.58.0",
|
||||
"xcb",
|
||||
]
|
||||
|
||||
|
|
|
|||
|
|
@ -31,12 +31,13 @@ xcb = { version = "1.7.1", features = ["shm", "xfixes"] }
|
|||
memmap2 = "0.9.11"
|
||||
|
||||
[target.'cfg(target_os = "windows")'.dependencies]
|
||||
windows = { version = "0.62.2", features = [
|
||||
windows = { version = "0.58.0", features = [
|
||||
"Win32_Foundation",
|
||||
"Win32_Graphics_Direct3D",
|
||||
"Win32_Graphics_Direct3D11",
|
||||
"Win32_Graphics_Dxgi",
|
||||
"Win32_Graphics_Dxgi_Common",
|
||||
"Win32_Graphics_Gdi",
|
||||
"Win32_System_Com",
|
||||
"Win32_UI_WindowsAndMessaging",
|
||||
"Win32_System_Threading",
|
||||
|
|
|
|||
|
|
@ -56,8 +56,7 @@ impl WindowsCapture {
|
|||
let output = adapter.EnumOutputs(0)?;
|
||||
let output1: IDXGIOutput1 = output.cast()?;
|
||||
|
||||
let mut desc = DXGI_OUTPUT_DESC::default();
|
||||
output.GetDesc(&mut desc)?;
|
||||
let desc = output.GetDesc()?;
|
||||
let width = (desc.DesktopCoordinates.right - desc.DesktopCoordinates.left) as u32;
|
||||
let height = (desc.DesktopCoordinates.bottom - desc.DesktopCoordinates.top) as u32;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue