generated from tipragot/rust
This commit is contained in:
parent
0aaf000c47
commit
285cd28512
|
@ -28,10 +28,10 @@ pub fn change_scaling(
|
||||||
windows: Query<&Window>,
|
windows: Query<&Window>,
|
||||||
size: Res<UILayoutSize>,
|
size: Res<UILayoutSize>,
|
||||||
) {
|
) {
|
||||||
if !windows.get_single().unwrap().resolution.physical_height() > 0 {
|
let window = windows.get_single().expect("Main window not found");
|
||||||
|
if window.resolution.physical_height() == 0 {
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
let window = windows.get_single().expect("Main window not found");
|
|
||||||
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,
|
||||||
|
|
Loading…
Reference in a new issue