Skip to content

Commit

Permalink
Get and cast value from HWND
Browse files Browse the repository at this point in the history
  • Loading branch information
junglie85 committed Oct 24, 2023
1 parent 81084f3 commit b0c44f7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion wgpu-hal/src/dx12/instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ impl crate::Instance<super::Api> for super::Instance {
raw_window_handle::RawWindowHandle::Win32(handle) => Ok(super::Surface {
factory: self.factory.clone(),
factory_media: self.factory_media.clone(),
target: SurfaceTarget::WndHandle(handle.hwnd as *mut _),
target: SurfaceTarget::WndHandle(handle.hwnd.get() as *mut _),
supports_allow_tearing: self.supports_allow_tearing,
swap_chain: None,
}),
Expand Down
2 changes: 1 addition & 1 deletion wgpu-hal/src/gles/wgl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ impl crate::Instance<super::Api> for Instance {
)));
};
Ok(Surface {
window: window.hwnd as *mut _,
window: window.hwnd.get() as *mut _,
presentable: true,
swapchain: None,
srgb_capable: self.srgb_capable,
Expand Down
2 changes: 1 addition & 1 deletion wgpu-hal/src/vulkan/instance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,7 @@ impl crate::Instance<super::Api> for super::Instance {
use winapi::um::libloaderapi::GetModuleHandleW;

let hinstance = unsafe { GetModuleHandleW(std::ptr::null()) };
self.create_surface_from_hwnd(hinstance as *mut _, handle.hwnd)
self.create_surface_from_hwnd(hinstance as *mut _, handle.hwnd.get() as *mut _)
}
#[cfg(target_os = "macos")]
(Rwh::AppKit(handle), _)
Expand Down

0 comments on commit b0c44f7

Please sign in to comment.