Add missing unsafe
This commit is contained in:
parent
20f5a51541
commit
f5a8878d8f
|
@ -103,7 +103,7 @@ fn create_surface(instance: &Instance,
|
||||||
window: &winit::Window)
|
window: &winit::Window)
|
||||||
-> Result<vk::SurfaceKHR, vk::Result> {
|
-> Result<vk::SurfaceKHR, vk::Result> {
|
||||||
use winit::os::windows::WindowExt;
|
use winit::os::windows::WindowExt;
|
||||||
let hwnd = window.get_hwnd() as *mut winapi::windef::HWND__;
|
let hwnd = unsafe {window.get_hwnd() as *mut winapi::windef::HWND__ };
|
||||||
let hinstance = user32::GetWindow(hwnd, 0) as *const ();
|
let hinstance = user32::GetWindow(hwnd, 0) as *const ();
|
||||||
let win32_create_info = vk::Win32SurfaceCreateInfoKHR {
|
let win32_create_info = vk::Win32SurfaceCreateInfoKHR {
|
||||||
s_type: vk::StructureType::Win32SurfaceCreateInfoKhr,
|
s_type: vk::StructureType::Win32SurfaceCreateInfoKhr,
|
||||||
|
|
Loading…
Reference in a new issue