some cleanup

This commit is contained in:
Lauri Räsänen 2023-01-28 14:03:40 +02:00
parent 7152d9d274
commit c1148ea8bc
2 changed files with 2 additions and 1 deletions

View file

@ -17,6 +17,7 @@ pub async fn run() {
{ {
// Winit prevents sizing with CSS, so we have to set // Winit prevents sizing with CSS, so we have to set
// the size manually when on web. // the size manually when on web.
// https://github.com/rust-windowing/winit/pull/2074
use winit::dpi::PhysicalSize; use winit::dpi::PhysicalSize;
window.set_inner_size(PhysicalSize::new(1920, 1080)); window.set_inner_size(PhysicalSize::new(1920, 1080));

View file

@ -11,7 +11,7 @@ pub fn run() {
#[cfg(target_arch = "wasm32")] #[cfg(target_arch = "wasm32")]
{ {
std::panic::set_hook(Box::new(console_error_panic_hook::hook)); std::panic::set_hook(Box::new(console_error_panic_hook::hook));
console_log::init_with_level(log::Level::Info).expect("Couldn't initialize logger"); console_log::init().expect("Couldn't initialize logger");
wasm_bindgen_futures::spawn_local(core::window::run()); wasm_bindgen_futures::spawn_local(core::window::run());
} }
#[cfg(not(target_arch = "wasm32"))] #[cfg(not(target_arch = "wasm32"))]