mirror of
https://github.com/maplibre/maplibre-rs.git
synced 2025-12-08 19:05:57 +00:00
Fix resize detection
This commit is contained in:
parent
005dca064e
commit
cfba8189c3
@ -159,6 +159,6 @@ fn main() {
|
|||||||
#[cfg(feature = "trace")]
|
#[cfg(feature = "trace")]
|
||||||
enable_tracing();
|
enable_tracing();
|
||||||
|
|
||||||
run_headless();
|
//run_headless();
|
||||||
run_in_window();
|
run_in_window();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -207,7 +207,7 @@ impl Surface {
|
|||||||
let frame = match surface.get_current_texture() {
|
let frame = match surface.get_current_texture() {
|
||||||
Ok(view) => view,
|
Ok(view) => view,
|
||||||
Err(wgpu::SurfaceError::Outdated) => {
|
Err(wgpu::SurfaceError::Outdated) => {
|
||||||
tracing::trace!("surface outdated");
|
log::warn!("surface outdated");
|
||||||
window.configure(device);
|
window.configure(device);
|
||||||
surface
|
surface
|
||||||
.get_current_texture()
|
.get_current_texture()
|
||||||
@ -278,6 +278,6 @@ impl HasChanged for WindowHead {
|
|||||||
type Criteria = (u32, u32);
|
type Criteria = (u32, u32);
|
||||||
|
|
||||||
fn has_changed(&self, criteria: &Self::Criteria) -> bool {
|
fn has_changed(&self, criteria: &Self::Criteria) -> bool {
|
||||||
self.surface_config.height != criteria.0 || self.surface_config.width != criteria.1
|
self.surface_config.width != criteria.0 || self.surface_config.height != criteria.1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user