mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-24 06:11:30 +11:00
Rename example, remove debug logging.
This commit is contained in:
parent
57d1e162ee
commit
b500808d1a
|
@ -7,22 +7,14 @@ extern crate winit;
|
||||||
#[cfg(target_os = "android")]
|
#[cfg(target_os = "android")]
|
||||||
android_start!(main);
|
android_start!(main);
|
||||||
|
|
||||||
fn resize_callback(width: u32, height: u32) {
|
|
||||||
println!("Window resized to {}x{}", width, height);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let window = winit::WindowBuilder::new()
|
let window = winit::WindowBuilder::new()
|
||||||
.with_title("A fantastic window!")
|
|
||||||
.with_window_resize_callback(resize_callback)
|
|
||||||
.with_min_dimensions(400, 200)
|
.with_min_dimensions(400, 200)
|
||||||
.with_max_dimensions(800, 400)
|
.with_max_dimensions(800, 400)
|
||||||
.build()
|
.build()
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
for event in window.wait_events() {
|
for event in window.wait_events() {
|
||||||
println!("{:?}", event);
|
|
||||||
|
|
||||||
match event {
|
match event {
|
||||||
winit::Event::Closed => break,
|
winit::Event::Closed => break,
|
||||||
_ => ()
|
_ => ()
|
Loading…
Reference in a new issue