mirror of
https://github.com/maplibre/maplibre-rs.git
synced 2025-12-08 19:05:57 +00:00
Fix ios and apple compilation
This commit is contained in:
parent
089db3c0e7
commit
b5f9a64183
@ -1,3 +1,4 @@
|
||||
use crate::io::cache::Cache;
|
||||
pub use std::time::Instant;
|
||||
|
||||
pub const COLOR_TEXTURE_FORMAT: wgpu::TextureFormat = wgpu::TextureFormat::Rgba8Unorm;
|
||||
@ -15,5 +16,16 @@ pub fn main() {
|
||||
.build(&event_loop)
|
||||
.unwrap();
|
||||
|
||||
pollster::block_on(crate::main_loop::setup(window, event_loop));
|
||||
let mut cache_io = Cache::new();
|
||||
let cache_main = cache_io.clone();
|
||||
|
||||
std::thread::spawn(move || {
|
||||
cache_io.run_loop();
|
||||
});
|
||||
|
||||
pollster::block_on(crate::main_loop::setup(
|
||||
window,
|
||||
event_loop,
|
||||
Box::new(cache_main),
|
||||
));
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
use winit::event_loop::EventLoop;
|
||||
use winit::window::WindowBuilder;
|
||||
|
||||
use crate::io::cache::Cache;
|
||||
pub use std::time::Instant;
|
||||
|
||||
// macOS and iOS (Metal)
|
||||
@ -16,5 +17,16 @@ pub fn mapr_apple_main() {
|
||||
.build(&event_loop)
|
||||
.unwrap();
|
||||
|
||||
pollster::block_on(crate::main_loop::setup(window, event_loop));
|
||||
let mut cache_io = Cache::new();
|
||||
let cache_main = cache_io.clone();
|
||||
|
||||
std::thread::spawn(move || {
|
||||
cache_io.run_loop();
|
||||
});
|
||||
|
||||
pollster::block_on(crate::main_loop::setup(
|
||||
window,
|
||||
event_loop,
|
||||
Box::new(cache_main),
|
||||
));
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user