diff --git a/vulkano-win/src/winit.rs b/vulkano-win/src/winit.rs index 0fc905a3..6aa6aaad 100644 --- a/vulkano-win/src/winit.rs +++ b/vulkano-win/src/winit.rs @@ -121,9 +121,13 @@ unsafe fn winit_to_surface>( instance: Arc, win: W, ) -> Result>, SurfaceCreationError> { - use winit::platform::android::WindowExtAndroid; - - Surface::from_android(instance, win.borrow().native_window(), win) + use raw_window_handle::HasRawWindowHandle; + use raw_window_handle::RawWindowHandle::AndroidNdk; + if let AndroidNdk(handle) = win.borrow().raw_window_handle() { + Surface::from_android(instance, handle.a_native_window, win) + } else { + unreachable!("This should be unreachable if the target is android"); + } } #[cfg(all(unix, not(target_os = "android"), not(target_os = "macos")))] diff --git a/vulkano/src/command_buffer/mod.rs b/vulkano/src/command_buffer/mod.rs index 215b29fd..ba4fe929 100644 --- a/vulkano/src/command_buffer/mod.rs +++ b/vulkano/src/command_buffer/mod.rs @@ -78,7 +78,7 @@ pub use self::commands::{ debug::CheckColorError, - image::{CheckClearColorImageError, CheckClearDepthStencilImageError, CheckBlitImageError}, + image::{CheckBlitImageError, CheckClearColorImageError, CheckClearDepthStencilImageError}, pipeline::{ CheckDescriptorSetsValidityError, CheckDispatchError, CheckDynamicStateValidityError, CheckIndexBufferError, CheckIndirectBufferError, CheckPipelineError, @@ -89,8 +89,8 @@ pub use self::commands::{ CheckResetQueryPoolError, CheckWriteTimestampError, }, transfer::{ - CheckCopyBufferError, CheckCopyBufferImageError, CheckCopyImageError, - CheckFillBufferError, CheckUpdateBufferError, + CheckCopyBufferError, CheckCopyBufferImageError, CheckCopyImageError, CheckFillBufferError, + CheckUpdateBufferError, }, }; pub use self::{