From f1df52c258e488f4b46391d4bfc0c33fbd350dd3 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Wed, 26 Jan 2022 17:20:59 +0100 Subject: [PATCH 1/2] Enable drag-and-drop events on windows --- crates/bevy_audio/Cargo.toml | 7 +++++-- crates/bevy_winit/src/winit_windows.rs | 7 ------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/crates/bevy_audio/Cargo.toml b/crates/bevy_audio/Cargo.toml index 50d4db05e5298..035b1ca20ae44 100644 --- a/crates/bevy_audio/Cargo.toml +++ b/crates/bevy_audio/Cargo.toml @@ -18,11 +18,14 @@ bevy_utils = { path = "../bevy_utils", version = "0.6.0" } # other anyhow = "1.0.4" -rodio = { version = "0.14", default-features = false } +rodio = { version = "0.15", default-features = false } +# we do not directly depend on cpal, but we require at least this version to be used by rodio +# so that the winit feature of drag and drop can be enabled https://github.com/RustAudio/cpal/issues/572 +cpal = ">=0.13.4" parking_lot = "0.11.0" [target.'cfg(target_arch = "wasm32")'.dependencies] -rodio = { version = "0.14", default-features = false, features = ["wasm-bindgen"] } +rodio = { version = "0.15", default-features = false, features = ["wasm-bindgen"] } [dev-dependencies] # bevy diff --git a/crates/bevy_winit/src/winit_windows.rs b/crates/bevy_winit/src/winit_windows.rs index f3fd83c6e8420..910b0a4f3f3c9 100644 --- a/crates/bevy_winit/src/winit_windows.rs +++ b/crates/bevy_winit/src/winit_windows.rs @@ -18,13 +18,6 @@ impl WinitWindows { window_id: WindowId, window_descriptor: &WindowDescriptor, ) -> Window { - #[cfg(target_os = "windows")] - let mut winit_window_builder = { - use winit::platform::windows::WindowBuilderExtWindows; - winit::window::WindowBuilder::new().with_drag_and_drop(false) - }; - - #[cfg(not(target_os = "windows"))] let mut winit_window_builder = winit::window::WindowBuilder::new(); winit_window_builder = match window_descriptor.mode { From 58ca082f556ce7a5c0a79176994f6850ac057e36 Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Mon, 4 Apr 2022 19:24:42 +0200 Subject: [PATCH 2/2] Remove cpal requirement from `bevy_audio` --- crates/bevy_audio/Cargo.toml | 3 --- 1 file changed, 3 deletions(-) diff --git a/crates/bevy_audio/Cargo.toml b/crates/bevy_audio/Cargo.toml index 035b1ca20ae44..13aa5a785866b 100644 --- a/crates/bevy_audio/Cargo.toml +++ b/crates/bevy_audio/Cargo.toml @@ -19,9 +19,6 @@ bevy_utils = { path = "../bevy_utils", version = "0.6.0" } # other anyhow = "1.0.4" rodio = { version = "0.15", default-features = false } -# we do not directly depend on cpal, but we require at least this version to be used by rodio -# so that the winit feature of drag and drop can be enabled https://github.com/RustAudio/cpal/issues/572 -cpal = ">=0.13.4" parking_lot = "0.11.0" [target.'cfg(target_arch = "wasm32")'.dependencies]