xrt: Remove xrt_view::display::{w|h}_meters

It is not used anywhere.
This commit is contained in:
Moses Turner 2021-12-10 21:26:06 -06:00
parent 59a09abf6a
commit 749723f0ba
5 changed files with 2 additions and 24 deletions

View file

@ -100,8 +100,6 @@ u_device_dump_config(struct xrt_device *xdev, const char *prefix, const char *pr
PRINT_INT( "views[0].viewport.h_pixels ", xdev->hmd->views[0].viewport.h_pixels);
PRINT_INT( "views[0].display.w_pixels ", xdev->hmd->views[0].display.w_pixels);
PRINT_INT( "views[0].display.h_pixels ", xdev->hmd->views[0].display.h_pixels);
PRINT_MM( "views[0].display.w_meters ", xdev->hmd->views[0].display.w_meters);
PRINT_MM( "views[0].display.h_meters ", xdev->hmd->views[0].display.h_meters);
PRINT_MAT2X2("views[0].rot ", xdev->hmd->views[0].rot);
PRINT_ANGLE( "views[0].fov.angle_left ", xdev->hmd->views[0].fov.angle_left);
PRINT_ANGLE( "views[0].fov.angle_right", xdev->hmd->views[0].fov.angle_right);
@ -114,8 +112,6 @@ u_device_dump_config(struct xrt_device *xdev, const char *prefix, const char *pr
PRINT_INT( "views[1].viewport.h_pixels ", xdev->hmd->views[1].viewport.h_pixels);
PRINT_INT( "views[1].display.w_pixels ", xdev->hmd->views[1].display.w_pixels);
PRINT_INT( "views[1].display.h_pixels ", xdev->hmd->views[1].display.h_pixels);
PRINT_MM( "views[1].display.w_meters ", xdev->hmd->views[1].display.w_meters);
PRINT_MM( "views[1].display.h_meters ", xdev->hmd->views[1].display.h_meters);
PRINT_MAT2X2("views[1].rot ", xdev->hmd->views[1].rot);
PRINT_ANGLE( "views[1].fov.angle_left ", xdev->hmd->views[1].fov.angle_left);
PRINT_ANGLE( "views[1].fov.angle_right", xdev->hmd->views[1].fov.angle_right);
@ -193,8 +189,6 @@ u_device_setup_split_side_by_side(struct xrt_device *xdev, const struct u_device
xdev->hmd->screens[0].h_pixels = info->display.h_pixels;
// Left
xdev->hmd->views[0].display.w_meters = w_meters;
xdev->hmd->views[0].display.h_meters = h_meters;
xdev->hmd->views[0].display.w_pixels = w_pixels;
xdev->hmd->views[0].display.h_pixels = h_pixels;
xdev->hmd->views[0].viewport.x_pixels = 0;
@ -204,8 +198,6 @@ u_device_setup_split_side_by_side(struct xrt_device *xdev, const struct u_device
xdev->hmd->views[0].rot = u_device_rotation_ident;
// Right
xdev->hmd->views[1].display.w_meters = w_meters;
xdev->hmd->views[1].display.h_meters = h_meters;
xdev->hmd->views[1].display.w_pixels = w_pixels;
xdev->hmd->views[1].display.h_pixels = h_pixels;
xdev->hmd->views[1].viewport.x_pixels = w_pixels;

View file

@ -759,10 +759,6 @@ 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_meters = info.views[0].display.w_meters;
ohd->base.hmd->views[0].display.h_meters = info.views[0].display.h_meters;
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;
@ -770,10 +766,6 @@ 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_meters = info.views[1].display.w_meters;
ohd->base.hmd->views[1].display.h_meters = info.views[1].display.h_meters;
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;
@ -809,8 +801,8 @@ create_hmd(ohmd_context *ctx, int device_idx, int device_flags)
ohd->distortion.openhmd[view].lens_center.x = info.views[view].lens_center_x_meters;
ohd->distortion.openhmd[view].lens_center.y = info.views[view].lens_center_y_meters;
ohd->distortion.openhmd[view].viewport_scale.x = ohd->base.hmd->views[view].display.w_meters;
ohd->distortion.openhmd[view].viewport_scale.y = ohd->base.hmd->views[view].display.h_meters;
ohd->distortion.openhmd[view].viewport_scale.x = info.views[view].display.w_meters;
ohd->distortion.openhmd[view].viewport_scale.y = info.views[view].display.h_meters;
}
// clang-format on

View file

@ -881,8 +881,6 @@ _create_hmd_device(struct survive_system *sys, const struct SurviveSimpleObject
for (uint8_t eye = 0; eye < 2; eye++) {
struct xrt_view *v = &survive->base.hmd->views[eye];
v->display.w_meters = (float)w_meters;
v->display.h_meters = (float)h_meters;
v->display.w_pixels = w_pixels;
v->display.h_pixels = h_pixels;
v->viewport.w_pixels = w_pixels;

View file

@ -830,8 +830,6 @@ vive_device_create(struct os_hid_device *mainboard_dev,
for (uint8_t eye = 0; eye < 2; eye++) {
struct xrt_view *v = &d->base.hmd->views[eye];
v->display.w_meters = (float)w_meters;
v->display.h_meters = (float)h_meters;
v->display.w_pixels = w_pixels;
v->display.h_pixels = h_pixels;
v->viewport.w_pixels = w_pixels;

View file

@ -65,8 +65,6 @@ struct xrt_view
{
uint32_t w_pixels;
uint32_t h_pixels;
float w_meters;
float h_meters;
} display;
/*!