mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-22 23:04:07 +00:00
refactor(d3d12): use mut_self
instead of round-tripping w/ mut_void
This commit is contained in:
parent
f43b706e17
commit
96c6c89e93
@ -44,7 +44,7 @@ pub fn enumerate_adapters(factory: d3d12::DxgiFactory) -> Vec<d3d12::DxgiAdapter
|
|||||||
|
|
||||||
profiling::scope!("IDXGIFactory1::EnumAdapters1");
|
profiling::scope!("IDXGIFactory1::EnumAdapters1");
|
||||||
let mut adapter1 = d3d12::WeakPtr::<dxgi::IDXGIAdapter1>::null();
|
let mut adapter1 = d3d12::WeakPtr::<dxgi::IDXGIAdapter1>::null();
|
||||||
let hr = unsafe { factory.EnumAdapters1(cur_index, adapter1.mut_void() as *mut *mut _) };
|
let hr = unsafe { factory.EnumAdapters1(cur_index, adapter1.mut_self()) };
|
||||||
|
|
||||||
if hr == winerror::DXGI_ERROR_NOT_FOUND {
|
if hr == winerror::DXGI_ERROR_NOT_FOUND {
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user