Use cfg aliases throught the code base
Co-authored-by: Mads Marquart <mads@marquart.dk>
This commit is contained in:
parent
58ec458877
commit
5e77d70245
27 changed files with 185 additions and 227 deletions
|
|
@ -14,13 +14,13 @@ pub fn main() {
|
|||
.build(&event_loop)
|
||||
.unwrap();
|
||||
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
#[cfg(wasm_platform)]
|
||||
let log_list = wasm::insert_canvas_and_create_log_list(&window);
|
||||
|
||||
event_loop.run(move |event, _, control_flow| {
|
||||
control_flow.set_wait();
|
||||
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
#[cfg(wasm_platform)]
|
||||
wasm::log_event(&log_list, &event);
|
||||
|
||||
match event {
|
||||
|
|
@ -36,7 +36,7 @@ pub fn main() {
|
|||
});
|
||||
}
|
||||
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
#[cfg(wasm_platform)]
|
||||
mod wasm {
|
||||
use wasm_bindgen::prelude::*;
|
||||
use winit::{event::Event, window::Window};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue