Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update winit dependency to 0.29 #8745

Closed
wants to merge 45 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
aaa3368
update winit, fail compilation :+1:
Vrixyz Jun 1, 2023
a93bf05
compiling ; but using physical key rather than virtual key
Vrixyz Jun 3, 2023
54483f9
added logical key from winit ; removed ScanCode ; removed copy from I…
Vrixyz Jun 4, 2023
ae25abc
Merge branch 'main' into update-winit
Vrixyz Jun 9, 2023
ce707df
add a temporary comment to know the tested commit from winit main
Vrixyz Jun 9, 2023
dff33c3
add nativekeycode ; fex fixes
Vrixyz Jun 9, 2023
4dcd03f
local clippy CI fixes
Vrixyz Jun 9, 2023
f60d6d5
use SmolStr rather than String ; cleanup comments
Vrixyz Jun 9, 2023
3472d29
trying to fix linux compile blindly
Vrixyz Jun 9, 2023
70dd9dd
add a dependency to CI examples
Vrixyz Jun 9, 2023
e650442
remove link to winit KeyCode
Vrixyz Jun 9, 2023
f5b01e3
KeyCode doc format
Vrixyz Jun 9, 2023
fbbd20f
replace instant for web-time (wip)
Vrixyz Jun 12, 2023
4b00316
fix transiant dependency to instant through fastrand
Vrixyz Jun 13, 2023
928a3a3
remove instant where applicable ; still present in dependencies throu…
Vrixyz Jun 13, 2023
ef3ffcb
Merge branch 'main' of github.com:Vrixyz/bevy into update-winit
Vrixyz Jun 14, 2023
2a0e5a6
Merge branch 'main' of github.com:bevyengine/bevy into update-winit
Vrixyz Jun 16, 2023
45ece61
fix compilation ; keycode name + winit new mouse buttons
Vrixyz Jun 16, 2023
ed5d07c
Merge branch 'main' of github.com:bevyengine/bevy into update-winit
Vrixyz Jun 22, 2023
301a80d
Merge remote-tracking branch 'upstream/main' into update-winit
Vrixyz Jun 27, 2023
c16c1c5
Merge branch 'main' of github.com:bevyengine/bevy into update-winit
Vrixyz Jul 20, 2023
995fce1
added winit commit sha tested
Vrixyz Jul 20, 2023
a4d5bd3
fix winit api
Vrixyz Jul 20, 2023
b156a24
Merge branch 'main' into update-winit
Vrixyz Aug 24, 2023
4f08176
fix conflict I didn't see
Vrixyz Aug 24, 2023
e35ce43
Merge branch 'main' into update-winit
Vrixyz Aug 31, 2023
e3aa65c
more correct run_ondemand winit api use
Vrixyz Aug 31, 2023
62a672e
fix resolution / window physical size
Vrixyz Aug 31, 2023
3fee55b
removed run_return from winit settings
Vrixyz Sep 1, 2023
8f57dd5
added boring comments to keyboard keys
Vrixyz Sep 1, 2023
db3cdd3
Merge branch 'main' into update-winit
Vrixyz Sep 8, 2023
329202a
Merge branch 'main' into update-winit
Vrixyz Sep 22, 2023
0375231
fix warnings
Vrixyz Sep 27, 2023
5a6f509
compiling with winit 0.29 ; crash on pause
Vrixyz Oct 22, 2023
0594c28
Merge branch 'main' of github.com:bevyengine/bevy into update-winit
Vrixyz Oct 22, 2023
9c44f83
fix namedKey to their types
Vrixyz Oct 24, 2023
9b0ea09
Merge branch 'main' of github.com:bevyengine/bevy into update-winit
Vrixyz Oct 24, 2023
9d038e7
fix docs
Vrixyz Oct 25, 2023
a68a824
Merge branch 'main' into update-winit
Vrixyz Oct 28, 2023
dac9182
Merge branch 'main' of github.com:bevyengine/bevy into update-winit
Vrixyz Oct 28, 2023
0aa4856
Merge branch 'main' into update-winit
Vrixyz Nov 8, 2023
bebfde0
update accesskit to newly released crate version
Vrixyz Nov 8, 2023
66541a0
fix process event api usage
Vrixyz Nov 8, 2023
c5de847
feedbacks from @devil-ira
Vrixyz Nov 8, 2023
1318e23
Merge branch 'main' into update-winit
Vrixyz Nov 22, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions crates/bevy_app/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ impl App {
///
/// # `run()` might not return
///
/// Calls to [`App::run()`] might never return.
/// Calls to [`App::run()`] will never return on iOS and Web.
///
/// In simple and *headless* applications, one can expect that execution will
/// proceed, normally, after calling [`run()`](App::run()) but this is not the case for
Expand All @@ -292,10 +292,7 @@ impl App {
/// window is closed and that event loop terminates – behavior of processes that
/// do not is often platform dependent or undocumented.
///
/// By default, *Bevy* uses the `winit` crate for window creation. See
/// [`WinitSettings::return_from_run`](https://docs.rs/bevy/latest/bevy/winit/struct.WinitSettings.html#structfield.return_from_run)
/// for further discussion of this topic and for a mechanism to require that [`App::run()`]
/// *does* return – albeit one that carries its own caveats and disclaimers.
/// By default, *Bevy* uses the `winit` crate for window creation.
///
/// # Panics
///
Expand Down
3 changes: 2 additions & 1 deletion crates/bevy_input/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ keywords = ["bevy"]

[features]
default = []
serialize = ["serde"]
serialize = ["serde", "smol_str/serde"]

[dependencies]
# bevy
Expand All @@ -25,6 +25,7 @@ bevy_reflect = { path = "../bevy_reflect", version = "0.12.0", features = [
# other
serde = { version = "1", features = ["derive"], optional = true }
thiserror = "1.0"
smol_str = "0.2"

[dev-dependencies]
bevy = { path = "../../", version = "0.12.0" }
Expand Down
8 changes: 4 additions & 4 deletions crates/bevy_input/src/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ use bevy_ecs::schedule::State;
///[`DetectChangesMut::bypass_change_detection`]: bevy_ecs::change_detection::DetectChangesMut::bypass_change_detection
#[derive(Debug, Clone, Resource, Reflect)]
#[reflect(Default)]
pub struct Input<T: Copy + Eq + Hash + Send + Sync + 'static> {
pub struct Input<T: Clone + Eq + Hash + Send + Sync + 'static> {
/// A collection of every button that is currently being pressed.
pressed: HashSet<T>,
/// A collection of every button that has just been pressed.
Expand All @@ -54,7 +54,7 @@ pub struct Input<T: Copy + Eq + Hash + Send + Sync + 'static> {
just_released: HashSet<T>,
}

impl<T: Copy + Eq + Hash + Send + Sync + 'static> Default for Input<T> {
impl<T: Clone + Eq + Hash + Send + Sync + 'static> Default for Input<T> {
fn default() -> Self {
Self {
pressed: Default::default(),
Expand All @@ -66,12 +66,12 @@ impl<T: Copy + Eq + Hash + Send + Sync + 'static> Default for Input<T> {

impl<T> Input<T>
where
T: Copy + Eq + Hash + Send + Sync + 'static,
T: Clone + Eq + Hash + Send + Sync + 'static,
{
/// Registers a press for the given `input`.
pub fn press(&mut self, input: T) {
// Returns `true` if the `input` wasn't pressed.
if self.pressed.insert(input) {
if self.pressed.insert(input.clone()) {
self.just_pressed.insert(input);
}
}
Expand Down
Loading
Loading