mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-25 23:01:30 +11:00
42 lines
819 B
Rust
42 lines
819 B
Rust
#[cfg(target_os = "android")]
|
|
#[macro_use]
|
|
extern crate android_glue;
|
|
|
|
extern crate winit;
|
|
|
|
use std::thread;
|
|
|
|
#[cfg(target_os = "android")]
|
|
android_start!(main);
|
|
|
|
fn main() {
|
|
let window1 = winit::WindowBuilder::new().build().unwrap();
|
|
let window2 = winit::WindowBuilder::new().build().unwrap();
|
|
let window3 = winit::WindowBuilder::new().build().unwrap();
|
|
|
|
let t1 = thread::spawn(move || {
|
|
run(window1);
|
|
});
|
|
|
|
let t2 = thread::spawn(move || {
|
|
run(window2);
|
|
});
|
|
|
|
let t3 = thread::spawn(move || {
|
|
run(window3);
|
|
});
|
|
|
|
let _ = t1.join();
|
|
let _ = t2.join();
|
|
let _ = t3.join();
|
|
}
|
|
|
|
fn run(window: winit::Window) {
|
|
for event in window.wait_events() {
|
|
match event {
|
|
winit::Event::Closed => break,
|
|
_ => ()
|
|
}
|
|
}
|
|
}
|