Fix crashes due to Responsive scaling #91

Merged
raphael merged 2 commits from fiw-reponsive(scaling into main 2024-03-31 16:27:32 +00:00

View file

@ -29,6 +29,9 @@ pub fn change_scaling(
size: Res<UILayoutSize>, size: Res<UILayoutSize>,
) { ) {
let window = windows.get_single().expect("Main window not found"); let window = windows.get_single().expect("Main window not found");
if window.resolution.physical_height() <= 0 {

<=

<=
return;
};
let (a, b) = ( let (a, b) = (
window.resolution.width() / size.0.x, window.resolution.width() / size.0.x,
window.resolution.height() / size.0.y, window.resolution.height() / size.0.y,