fix(windows): Fix D3D11CreateDevice software arg, IDXGIOutput::GetDesc signature, and SWS flags
This commit is contained in:
parent
3a27b279b2
commit
e0096b0f86
2 changed files with 5 additions and 4 deletions
|
|
@ -38,7 +38,7 @@ impl WindowsCapture {
|
|||
D3D11CreateDevice(
|
||||
None,
|
||||
D3D_DRIVER_TYPE_HARDWARE,
|
||||
None,
|
||||
HMODULE(std::ptr::null_mut()),
|
||||
D3D11_CREATE_DEVICE_BGRA_SUPPORT,
|
||||
Some(&[D3D_FEATURE_LEVEL_11_1, D3D_FEATURE_LEVEL_11_0]),
|
||||
D3D11_SDK_VERSION,
|
||||
|
|
@ -56,7 +56,8 @@ impl WindowsCapture {
|
|||
let output = adapter.EnumOutputs(0)?;
|
||||
let output1: IDXGIOutput1 = output.cast()?;
|
||||
|
||||
let desc = output.GetDesc()?;
|
||||
let mut desc = DXGI_OUTPUT_DESC::default();
|
||||
output.GetDesc(&mut desc)?;
|
||||
let width = (desc.DesktopCoordinates.right - desc.DesktopCoordinates.left) as u32;
|
||||
let height = (desc.DesktopCoordinates.bottom - desc.DesktopCoordinates.top) as u32;
|
||||
|
||||
|
|
|
|||
|
|
@ -384,10 +384,10 @@ impl WindowsHwEncoder {
|
|||
width as i32,
|
||||
height as i32,
|
||||
(*codec_ctx).pix_fmt,
|
||||
SWS_FAST_BILINEAR,
|
||||
2,
|
||||
ptr::null_mut(),
|
||||
ptr::null_mut(),
|
||||
ptr::null_mut(),
|
||||
ptr::null(),
|
||||
);
|
||||
|
||||
Ok(Self {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue