xrt: Revert xrt_view::display::{w|h}_pixels changes

Commit 749723f0ba ("xrt: Remove xrt_view::display::{w|h}_meters")
accidentally removed some references to {w|h}_pixels as well as
{w|h}_meters. This resulted in recommended view image sizes of 0px*0px.

Revert those changes without reverting the rest of the commit.

Fixes: 749723f0ba ("xrt: Remove xrt_view::display::{w|h}_meters")
This commit is contained in:
James Hogan 2021-12-20 22:58:46 +00:00
parent 5635cd3885
commit 7ee8d1ac5d
No known key found for this signature in database
GPG key ID: 35CEE4862B1023F2

View file

@ -759,6 +759,8 @@ create_hmd(ohmd_context *ctx, int device_idx, int device_flags)
ohd->base.hmd->screens[0].nominal_frame_interval_ns = info.display.nominal_frame_interval_ns;
// Left
ohd->base.hmd->views[0].display.w_pixels = info.views[0].display.w_pixels;
ohd->base.hmd->views[0].display.h_pixels = info.views[0].display.h_pixels;
ohd->base.hmd->views[0].viewport.x_pixels = 0;
ohd->base.hmd->views[0].viewport.y_pixels = 0;
ohd->base.hmd->views[0].viewport.w_pixels = info.views[0].display.w_pixels;
@ -766,6 +768,8 @@ create_hmd(ohmd_context *ctx, int device_idx, int device_flags)
ohd->base.hmd->views[0].rot = u_device_rotation_ident;
// Right
ohd->base.hmd->views[1].display.w_pixels = info.views[1].display.w_pixels;
ohd->base.hmd->views[1].display.h_pixels = info.views[1].display.h_pixels;
ohd->base.hmd->views[1].viewport.x_pixels = info.views[0].display.w_pixels;
ohd->base.hmd->views[1].viewport.y_pixels = 0;
ohd->base.hmd->views[1].viewport.w_pixels = info.views[1].display.w_pixels;