Skip to content

Commit

Permalink
Bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
TheRawMeatball committed Dec 23, 2020
1 parent 31549e6 commit 77bf048
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions crates/bevy_winit/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -339,12 +339,11 @@ pub fn winit_runner(mut app: App) {
let mut windows = app.resources.get_mut::<Windows>().unwrap();
let window_id = winit_windows.get_window_id(winit_window_id).unwrap();
let window = windows.get_mut(window_id).unwrap();
if let Some(sf) = window.scale_factor_override() {
*new_inner_size = winit::dpi::LogicalSize::new(
if window.scale_factor_override().is_some() {
*new_inner_size = winit::dpi::PhysicalSize::new(
window.physical_width(),
window.physical_height(),
)
.to_physical(sf)
} else {
window.update_actual_size_from_backend(
new_inner_size.width,
Expand Down

0 comments on commit 77bf048

Please sign in to comment.