refactor(d3d12): use mut_self instead of round-tripping w/ mut_void

This commit is contained in:
Erich Gubler 2023-03-24 14:45:49 -04:00 committed by Teodor Tanasoaia
parent f43b706e17
commit 96c6c89e93

View File

@ -44,7 +44,7 @@ pub fn enumerate_adapters(factory: d3d12::DxgiFactory) -> Vec<d3d12::DxgiAdapter
profiling::scope!("IDXGIFactory1::EnumAdapters1");
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 {
break;