Skip to content

Winit 0.27 update - #5347

Closed
Aceeri wants to merge 5 commits into
bevyengine:mainfrom
Aceeri:winit-update
Closed

Aceeri wants to merge 5 commits into
bevyengine:mainfrom
Aceeri:winit-update

Conversation

@Aceeri

@Aceeri Aceeri commented Jul 17, 2022

Copy link
Copy Markdown
Member

Objective

  • This is just a pre-emptive PR for the next winit version
  • Update winit dependency to 0.27

Solution


Changelog

  • Changed cursor_locked to cursor_grab_mode and created a CursorGrabMode enum similar to winit's.

Migration Guide

  • Will need to change the true/false of WindowDescriptors for cursor_locked to CursorGrabMode::Locked.

Could add this is we want

impl From<bool> for CursorGrabMode {
    fn into(self) -> CursorGrabMode {
        if self { CursorGrabMode::Locked } else { CursorGrabMode::None }
    }
}

@alice-i-cecile alice-i-cecile added A-Windowing Platform-agnostic interface layer to run your app in C-Dependencies A change to the crates that Bevy depends on labels Jul 17, 2022
Comment thread crates/bevy_window/src/window.rs Outdated
@Aceeri

Aceeri commented Aug 1, 2022

Copy link
Copy Markdown
Member Author

winit 0.27 has been released but this is still blocked on wgpu updating its raw-window-handle dep here: gfx-rs/wgpu#2918

@Aceeri
Aceeri marked this pull request as ready for review August 1, 2022 02:15
@Aceeri Aceeri changed the title Pre-emptive winit update Winit 0.27 update Aug 1, 2022
Comment thread crates/bevy_winit/Cargo.toml Outdated
Comment on lines +25 to +30
winit = { version = "0.27", default-features = false }
approx = { version = "0.5", default-features = false }
raw-window-handle = "0.5"

[target.'cfg(target_arch = "wasm32")'.dependencies]
winit = { version = "0.26.0", default-features = false }
winit = { version = "0.27", default-features = false }

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is winit duplicated here?
As wasm doesn't add any new features, the duplicate entry should just be removed.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, not entirely sure... I'll remove it unless anyone has any concerns about it.

@cwfitzgerald

cwfitzgerald commented Aug 1, 2022

Copy link
Copy Markdown

Do note that because of it being a public dependency wgpu cannot release a patch to rwh 0.5, so this will have to wait till wgpu 0.14 in late september.

@Aceeri

Aceeri commented Aug 1, 2022

Copy link
Copy Markdown
Member Author

@cwfitzgerald No worries, this missed the bevy 0.8 release anyways and late september still falls solidly into the bevy 0.9 release window I think.

@mockersf

mockersf commented Aug 1, 2022

Copy link
Copy Markdown
Member

Could you also update ndk-glue? It needs to be kept in sync with winit

@harudagondi

Copy link
Copy Markdown
Member

By the way, updating ndk glue to 0.7 would (probably) not resolve #3648, since cpal still uses 0.6.

@Aceeri

Aceeri commented Aug 2, 2022

Copy link
Copy Markdown
Member Author

@harudagondi I'll put in a quick PR to them to update to 0.7 so we can fix both of em.

@Weibye

Weibye commented Aug 27, 2022

Copy link
Copy Markdown
Contributor

@Aceeri What is the status of this? Still blocked?

@Aceeri

Aceeri commented Aug 27, 2022

Copy link
Copy Markdown
Member Author

Ya this will prob be blocked for another month or so for wgpu stuff. We could use a git revision if we wanted in the mean time I suppose

@Weibye Weibye added the S-Blocked This cannot move forward until something else changes label Aug 28, 2022
@frewsxcv

Copy link
Copy Markdown
Contributor

For visibility, here's another update attempt: #6086

@alice-i-cecile alice-i-cecile added this to the Bevy 0.9 milestone Oct 5, 2022
@mockersf

mockersf commented Oct 5, 2022

Copy link
Copy Markdown
Member

wgpu 0.14 (and naga 0.10) have been published!

@alice-i-cecile alice-i-cecile removed the S-Blocked This cannot move forward until something else changes label Oct 5, 2022
@mockersf

mockersf commented Oct 7, 2022

Copy link
Copy Markdown
Member

@Aceeri any chance you can pick up the updates soon?

@Aceeri

Aceeri commented Oct 7, 2022

Copy link
Copy Markdown
Member Author

@mockersf Ya, been just a bit tied up in trying to get spring forces that don't become unstable with bad user inputs but I'll work on gettin this back into shape this week.

@alice-i-cecile

Copy link
Copy Markdown
Member

Closing in favor of #6218, which is nearly ready to merge :) Thanks for scouting this out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Windowing Platform-agnostic interface layer to run your app in C-Dependencies A change to the crates that Bevy depends on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants