From 79d755544947cb0cc67d6332203c547b17261c64 Mon Sep 17 00:00:00 2001 From: Jakob Bornecrantz Date: Sat, 27 Apr 2019 08:31:40 +0100 Subject: [PATCH] d/ohmd: Make rotate in be more correct --- src/xrt/drivers/ohmd/oh_device.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/xrt/drivers/ohmd/oh_device.c b/src/xrt/drivers/ohmd/oh_device.c index 6528fb9e1..7583272cc 100644 --- a/src/xrt/drivers/ohmd/oh_device.c +++ b/src/xrt/drivers/ohmd/oh_device.c @@ -480,7 +480,15 @@ oh_device_create(ohmd_context *ctx, } if (quirk_rotate_inwards) { + int w2 = info.display.w_pixels / 2; + int h = info.display.h_pixels; + + ohd->base.views[0].display.w_pixels = h; + ohd->base.views[0].display.h_pixels = w2; ohd->base.views[0].rot = u_device_rotation_right; + + ohd->base.views[1].display.w_pixels = h; + ohd->base.views[1].display.h_pixels = w2; ohd->base.views[1].rot = u_device_rotation_left; }