Platform is called Web not Wasm (#3393)

This commit is contained in:
daxpedda 2024-01-14 18:54:52 +01:00 committed by GitHub
parent 2ee44246ae
commit 16d860736b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 57 additions and 57 deletions

View file

@ -11,18 +11,18 @@ pub fn main() -> Result<(), impl std::error::Error> {
let event_loop = EventLoop::new().unwrap();
let builder = WindowBuilder::new().with_title("A fantastic window!");
#[cfg(wasm_platform)]
#[cfg(web_platform)]
let builder = {
use winit::platform::web::WindowBuilderExtWebSys;
builder.with_append(true)
};
let window = builder.build(&event_loop).unwrap();
#[cfg(wasm_platform)]
#[cfg(web_platform)]
let log_list = wasm::insert_canvas_and_create_log_list(&window);
event_loop.run(move |event, elwt| {
#[cfg(wasm_platform)]
#[cfg(web_platform)]
wasm::log_event(&log_list, &event);
match event {
@ -57,7 +57,7 @@ pub fn main() -> Result<(), impl std::error::Error> {
})
}
#[cfg(wasm_platform)]
#[cfg(web_platform)]
mod wasm {
use std::num::NonZeroU32;