Revert "fix openxr aspect ratio calculation (#430)"

This reverts commit 5dae6f8387.
This commit is contained in:
Cvikli 2026-02-24 14:56:29 +01:00
parent b84d565b1e
commit 0149b2cde4
1 changed files with 3 additions and 3 deletions

View File

@ -97,13 +97,13 @@ impl OverlayWindowData<OpenXrOverlayData> {
let transform = state.transform * self.config.backend.frame_meta().unwrap().transform; // contract
let aspect_ratio = swapchain.extent[0] as f32 / swapchain.extent[1] as f32;
let aspect_ratio = swapchain.extent[1] as f32 / swapchain.extent[0] as f32;
let (scale_x, scale_y) = if aspect_ratio < 1.0 {
let major = transform.matrix3.col(0).length();
(major * aspect_ratio, major)
(major, major * aspect_ratio)
} else {
let major = transform.matrix3.col(1).length();
(major, major / aspect_ratio)
(major / aspect_ratio, major)
};
let flags = if state.additive {