Skip to content

Commit 14cf95e

Browse files
committed
fix wasm stuff
1 parent bdf341a commit 14cf95e

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

crates/bevy_winit/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ mod winit_config;
1616
mod winit_windows;
1717

1818
use accessibility::AccessibilityPlugin;
19-
pub use runner::*;
19+
use runner::*;
2020
use system::{changed_windows, create_windows, despawn_windows};
2121
#[cfg(target_arch = "wasm32")]
22-
use web_resize::{CanvasParentResizeEventChannel, CanvasParentResizePlugin};
22+
use web_resize::CanvasParentResizePlugin;
2323
pub use winit_config::*;
2424
pub use winit_windows::*;
2525

@@ -28,8 +28,8 @@ use winit::event_loop::EventLoopBuilder;
2828
pub use winit::platform::android::activity::AndroidApp;
2929

3030
#[cfg(not(target_arch = "wasm32"))]
31-
use bevy_app::AppEvent;
32-
use bevy_app::{App, First, Last, Plugin};
31+
use bevy_app::First;
32+
use bevy_app::{App, AppEvent, Last, Plugin};
3333
use bevy_derive::{Deref, DerefMut};
3434
use bevy_ecs::prelude::*;
3535
use bevy_ecs::storage::{ThreadLocalTask, ThreadLocalTaskSendError, ThreadLocalTaskSender};

crates/bevy_winit/src/system.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,16 @@ use winit::dpi::{LogicalPosition, LogicalSize, PhysicalPosition, PhysicalSize};
1111

1212
#[cfg(target_arch = "wasm32")]
1313
use crate::web_resize::{CanvasParentResizeEventChannel, WINIT_CANVAS_SELECTOR};
14+
#[cfg(not(target_arch = "wasm32"))]
15+
use crate::WinitWindowEntityMap;
1416
use crate::{
1517
accessibility::{AccessKitAdapters, WinitActionHandlers},
1618
attempt_grab,
1719
converters::{
1820
convert_cursor_icon, convert_enabled_buttons, convert_window_level, convert_window_theme,
1921
convert_winit_theme,
2022
},
21-
get_best_videomode, get_fitting_videomode, EventLoopWindowTarget, WinitWindowEntityMap,
22-
WinitWindows,
23+
get_best_videomode, get_fitting_videomode, EventLoopWindowTarget, WinitWindows,
2324
};
2425

2526
/// Creates new windows on the [`winit`] backend for each entity with a newly-added

0 commit comments

Comments
 (0)