mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 07:04:33 +00:00
Correctly check physical size when updating winit (#13942)
Fixes #13701 After `winit` upgrade to `0.31`, windows were no longer correctly resizing. This appears to just have been a simple mistake, where the new physical size was being sourced from the `winit` window rather than on the incoming `Window` component. ## Testing Tested on macOS, but I'm curious whether this was also broken on other platforms.
This commit is contained in:
parent
2f9c42bb33
commit
8635a0f916
1 changed files with 4 additions and 1 deletions
|
@ -223,7 +223,10 @@ pub(crate) fn changed_windows(
|
|||
}
|
||||
|
||||
if window.resolution != cache.window.resolution {
|
||||
let mut physical_size = winit_window.inner_size();
|
||||
let mut physical_size = PhysicalSize::new(
|
||||
window.resolution.physical_width(),
|
||||
window.resolution.physical_height(),
|
||||
);
|
||||
|
||||
let cached_physical_size = PhysicalSize::new(
|
||||
cache.window.physical_width(),
|
||||
|
|
Loading…
Reference in a new issue