This commit is contained in:
parent
bc94b68c0c
commit
e9ce480f96
10 changed files with 175 additions and 136 deletions
|
@ -24,14 +24,15 @@ impl Window {
|
|||
}
|
||||
|
||||
pub fn required_extensions(&self) -> anyhow::Result<Vec<*const c_char>> {
|
||||
let display_handle = self.handle
|
||||
let display_handle = self
|
||||
.handle
|
||||
.as_ref()
|
||||
.ok_or_else(|| anyhow::anyhow!("Window not found"))?
|
||||
.display_handle()?;
|
||||
|
||||
#[allow(unused_mut)]
|
||||
let mut extension_names = ash_window::enumerate_required_extensions(display_handle.as_raw())?
|
||||
.to_vec();
|
||||
let mut extension_names =
|
||||
ash_window::enumerate_required_extensions(display_handle.as_raw())?.to_vec();
|
||||
|
||||
// TODO: Move this because is not related to Window extensions
|
||||
#[cfg(any(target_os = "macos", target_os = "ios"))]
|
||||
|
@ -55,7 +56,7 @@ impl Window {
|
|||
pub fn request_redraw(&self) {
|
||||
match self.handle.as_ref() {
|
||||
Some(window) => window.request_redraw(),
|
||||
None => log::warn!("Redraw requested but no window found")
|
||||
None => log::warn!("Redraw requested but no window found"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue