mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2024-11-21 22:34:43 +00:00
fix for android surface acquiring (#1868)
This commit is contained in:
parent
d1ab3f6726
commit
c79437191a
@ -121,9 +121,13 @@ unsafe fn winit_to_surface<W: SafeBorrow<Window>>(
|
||||
instance: Arc<Instance>,
|
||||
win: W,
|
||||
) -> Result<Arc<Surface<W>>, 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")))]
|
||||
|
@ -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::{
|
||||
|
Loading…
Reference in New Issue
Block a user