Skip to content

Commit d5d333f

Browse files
zicklagTekhnaeRaav
andauthored
fix: update bones window size to match bevy window size each frame. (#496)
Co-authored-by: Tekhnae Raav <[email protected]>
1 parent fc00c0c commit d5d333f

File tree

1 file changed

+2
-1
lines changed
  • framework_crates/bones_bevy_renderer/src

1 file changed

+2
-1
lines changed

framework_crates/bones_bevy_renderer/src/render.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ pub fn sync_bones_window(mut game: ResMut<BonesGame>, mut window_query: Query<&m
116116
game.shared_resource_cell().unwrap()
117117
}
118118
};
119-
let bones_window = bones_window.borrow().unwrap();
119+
let mut bones_window = bones_window.borrow_mut().unwrap();
120120

121121
let is_fullscreen = matches!(&window.mode, WindowMode::BorderlessFullscreen);
122122
if is_fullscreen != bones_window.fullscreen {
@@ -126,6 +126,7 @@ pub fn sync_bones_window(mut game: ResMut<BonesGame>, mut window_query: Query<&m
126126
WindowMode::Windowed
127127
};
128128
}
129+
bones_window.size = vec2(window.width(), window.height());
129130
}
130131

131132
/// Sync bones cameras with Bevy

0 commit comments

Comments
 (0)