diff --git a/src/xrt/drivers/android/android_sensors.c b/src/xrt/drivers/android/android_sensors.c index d717dc3e8..57f0cd6d2 100644 --- a/src/xrt/drivers/android/android_sensors.c +++ b/src/xrt/drivers/android/android_sensors.c @@ -170,7 +170,7 @@ android_device_get_tracked_pose(struct xrt_device *xdev, static void android_device_get_view_pose(struct xrt_device *xdev, - struct xrt_vec3 *eye_relation, + const struct xrt_vec3 *eye_relation, uint32_t view_index, struct xrt_pose *out_pose) { diff --git a/src/xrt/drivers/dummy/dummy_hmd.c b/src/xrt/drivers/dummy/dummy_hmd.c index edcb28df4..216d2b6be 100644 --- a/src/xrt/drivers/dummy/dummy_hmd.c +++ b/src/xrt/drivers/dummy/dummy_hmd.c @@ -121,7 +121,7 @@ dummy_hmd_get_tracked_pose(struct xrt_device *xdev, static void dummy_hmd_get_view_pose(struct xrt_device *xdev, - struct xrt_vec3 *eye_relation, + const struct xrt_vec3 *eye_relation, uint32_t view_index, struct xrt_pose *out_pose) { diff --git a/src/xrt/drivers/hdk/hdk_device.cpp b/src/xrt/drivers/hdk/hdk_device.cpp index a082d45c4..d2ca2a2d7 100644 --- a/src/xrt/drivers/hdk/hdk_device.cpp +++ b/src/xrt/drivers/hdk/hdk_device.cpp @@ -260,7 +260,7 @@ hdk_device_get_tracked_pose(struct xrt_device *xdev, static void hdk_device_get_view_pose(struct xrt_device *xdev, - struct xrt_vec3 *eye_relation, + const struct xrt_vec3 *eye_relation, uint32_t view_index, struct xrt_pose *out_pose) { diff --git a/src/xrt/drivers/illixr/illixr_device.cpp b/src/xrt/drivers/illixr/illixr_device.cpp index ecc7cd250..897c0275b 100644 --- a/src/xrt/drivers/illixr/illixr_device.cpp +++ b/src/xrt/drivers/illixr/illixr_device.cpp @@ -132,7 +132,7 @@ illixr_hmd_get_tracked_pose(struct xrt_device *xdev, static void illixr_hmd_get_view_pose(struct xrt_device *xdev, - struct xrt_vec3 *eye_relation, + const struct xrt_vec3 *eye_relation, uint32_t view_index, struct xrt_pose *out_pose) { diff --git a/src/xrt/drivers/multi_wrapper/multi.c b/src/xrt/drivers/multi_wrapper/multi.c index c393d62da..8a90256dd 100644 --- a/src/xrt/drivers/multi_wrapper/multi.c +++ b/src/xrt/drivers/multi_wrapper/multi.c @@ -179,7 +179,10 @@ set_output(struct xrt_device *xdev, enum xrt_output_name name, union xrt_output_ } static void -get_view_pose(struct xrt_device *xdev, struct xrt_vec3 *eye_relation, uint32_t view_index, struct xrt_pose *out_pose) +get_view_pose(struct xrt_device *xdev, + const struct xrt_vec3 *eye_relation, + uint32_t view_index, + struct xrt_pose *out_pose) { struct multi_device *d = (struct multi_device *)xdev; struct xrt_device *target = d->tracking_override.target; diff --git a/src/xrt/drivers/north_star/ns_hmd.c b/src/xrt/drivers/north_star/ns_hmd.c index 645c2b1b8..b1316051d 100644 --- a/src/xrt/drivers/north_star/ns_hmd.c +++ b/src/xrt/drivers/north_star/ns_hmd.c @@ -93,7 +93,7 @@ ns_hmd_get_tracked_pose(struct xrt_device *xdev, static void ns_hmd_get_view_pose(struct xrt_device *xdev, - struct xrt_vec3 *eye_relation, + const struct xrt_vec3 *eye_relation, uint32_t view_index, struct xrt_pose *out_pose) { @@ -201,7 +201,7 @@ ns_fov_calculate(struct xrt_fov *fov, struct xrt_quat projection) static void ns_v2_hmd_get_view_pose(struct xrt_device *xdev, - struct xrt_vec3 *eye_relation, + const struct xrt_vec3 *eye_relation, uint32_t view_index, struct xrt_pose *out_pose) { diff --git a/src/xrt/drivers/ohmd/oh_device.c b/src/xrt/drivers/ohmd/oh_device.c index 87a57da8c..fc6144802 100644 --- a/src/xrt/drivers/ohmd/oh_device.c +++ b/src/xrt/drivers/ohmd/oh_device.c @@ -432,7 +432,7 @@ oh_device_get_tracked_pose(struct xrt_device *xdev, static void oh_device_get_view_pose(struct xrt_device *xdev, - struct xrt_vec3 *eye_relation, + const struct xrt_vec3 *eye_relation, uint32_t view_index, struct xrt_pose *out_pose) { diff --git a/src/xrt/drivers/psvr/psvr_device.c b/src/xrt/drivers/psvr/psvr_device.c index 9188b16bd..c7ba60b28 100644 --- a/src/xrt/drivers/psvr/psvr_device.c +++ b/src/xrt/drivers/psvr/psvr_device.c @@ -929,7 +929,7 @@ psvr_device_get_tracked_pose(struct xrt_device *xdev, static void psvr_device_get_view_pose(struct xrt_device *xdev, - struct xrt_vec3 *eye_relation, + const struct xrt_vec3 *eye_relation, uint32_t view_index, struct xrt_pose *out_pose) { diff --git a/src/xrt/drivers/qwerty/qwerty_device.c b/src/xrt/drivers/qwerty/qwerty_device.c index b27e3ffe4..7540e1e8f 100644 --- a/src/xrt/drivers/qwerty/qwerty_device.c +++ b/src/xrt/drivers/qwerty/qwerty_device.c @@ -196,7 +196,7 @@ qwerty_get_tracked_pose(struct xrt_device *xd, static void qwerty_get_view_pose(struct xrt_device *xd, - struct xrt_vec3 *eye_relation, + const struct xrt_vec3 *eye_relation, uint32_t view_index, struct xrt_pose *out_pose) { diff --git a/src/xrt/drivers/realsense/rs_6dof.c b/src/xrt/drivers/realsense/rs_6dof.c index 3a6d00673..7a5460a2a 100644 --- a/src/xrt/drivers/realsense/rs_6dof.c +++ b/src/xrt/drivers/realsense/rs_6dof.c @@ -366,7 +366,7 @@ rs_6dof_get_tracked_pose(struct xrt_device *xdev, } static void rs_6dof_get_view_pose(struct xrt_device *xdev, - struct xrt_vec3 *eye_relation, + const struct xrt_vec3 *eye_relation, uint32_t view_index, struct xrt_pose *out_pose) { diff --git a/src/xrt/drivers/remote/r_device.c b/src/xrt/drivers/remote/r_device.c index f21af1299..9075feab1 100644 --- a/src/xrt/drivers/remote/r_device.c +++ b/src/xrt/drivers/remote/r_device.c @@ -148,7 +148,7 @@ r_device_get_hand_tracking(struct xrt_device *xdev, static void r_device_get_view_pose(struct xrt_device *xdev, - struct xrt_vec3 *eye_relation, + const struct xrt_vec3 *eye_relation, uint32_t view_index, struct xrt_pose *out_pose) { diff --git a/src/xrt/drivers/remote/r_hmd.c b/src/xrt/drivers/remote/r_hmd.c index 0be94a456..717cf664c 100644 --- a/src/xrt/drivers/remote/r_hmd.c +++ b/src/xrt/drivers/remote/r_hmd.c @@ -85,7 +85,7 @@ r_hmd_get_hand_tracking(struct xrt_device *xdev, static void r_hmd_get_view_pose(struct xrt_device *xdev, - struct xrt_vec3 *eye_relation, + const struct xrt_vec3 *eye_relation, uint32_t view_index, struct xrt_pose *out_pose) { diff --git a/src/xrt/drivers/survive/survive_driver.c b/src/xrt/drivers/survive/survive_driver.c index 1190fd8b2..63beb076c 100644 --- a/src/xrt/drivers/survive/survive_driver.c +++ b/src/xrt/drivers/survive/survive_driver.c @@ -443,7 +443,7 @@ survive_controller_get_hand_tracking(struct xrt_device *xdev, static void survive_device_get_view_pose(struct xrt_device *xdev, - struct xrt_vec3 *eye_relation, + const struct xrt_vec3 *eye_relation, uint32_t view_index, struct xrt_pose *out_pose) { diff --git a/src/xrt/drivers/vive/vive_device.c b/src/xrt/drivers/vive/vive_device.c index 93b81a75c..17f4d4b53 100644 --- a/src/xrt/drivers/vive/vive_device.c +++ b/src/xrt/drivers/vive/vive_device.c @@ -138,7 +138,7 @@ vive_device_get_tracked_pose(struct xrt_device *xdev, static void vive_device_get_view_pose(struct xrt_device *xdev, - struct xrt_vec3 *eye_relation, + const struct xrt_vec3 *eye_relation, uint32_t view_index, struct xrt_pose *out_pose) { diff --git a/src/xrt/drivers/wmr/wmr_hmd.c b/src/xrt/drivers/wmr/wmr_hmd.c index 619188cac..4dca42be2 100644 --- a/src/xrt/drivers/wmr/wmr_hmd.c +++ b/src/xrt/drivers/wmr/wmr_hmd.c @@ -412,7 +412,7 @@ wmr_hmd_get_tracked_pose(struct xrt_device *xdev, static void wmr_hmd_get_view_pose(struct xrt_device *xdev, - struct xrt_vec3 *eye_relation, + const struct xrt_vec3 *eye_relation, uint32_t view_index, struct xrt_pose *out_pose) { diff --git a/src/xrt/include/xrt/xrt_device.h b/src/xrt/include/xrt/xrt_device.h index 760dd78e5..f4d001a90 100644 --- a/src/xrt/include/xrt/xrt_device.h +++ b/src/xrt/include/xrt/xrt_device.h @@ -341,7 +341,7 @@ struct xrt_device * orientation unless you have canted screens. */ void (*get_view_pose)(struct xrt_device *xdev, - struct xrt_vec3 *eye_relation, + const struct xrt_vec3 *eye_relation, uint32_t view_index, struct xrt_pose *out_pose); @@ -410,7 +410,7 @@ xrt_device_set_output(struct xrt_device *xdev, enum xrt_output_name name, union */ static inline void xrt_device_get_view_pose(struct xrt_device *xdev, - struct xrt_vec3 *eye_relation, + const struct xrt_vec3 *eye_relation, uint32_t view_index, struct xrt_pose *out_pose) { diff --git a/src/xrt/ipc/client/ipc_client_device.c b/src/xrt/ipc/client/ipc_client_device.c index a03587d1c..1ddb2eaed 100644 --- a/src/xrt/ipc/client/ipc_client_device.c +++ b/src/xrt/ipc/client/ipc_client_device.c @@ -120,7 +120,7 @@ ipc_client_device_get_hand_tracking(struct xrt_device *xdev, static void ipc_client_device_get_view_pose(struct xrt_device *xdev, - struct xrt_vec3 *eye_relation, + const struct xrt_vec3 *eye_relation, uint32_t view_index, struct xrt_pose *out_pose) { diff --git a/src/xrt/ipc/client/ipc_client_hmd.c b/src/xrt/ipc/client/ipc_client_hmd.c index f9305c609..ef44e12c6 100644 --- a/src/xrt/ipc/client/ipc_client_hmd.c +++ b/src/xrt/ipc/client/ipc_client_hmd.c @@ -106,7 +106,7 @@ ipc_client_hmd_get_tracked_pose(struct xrt_device *xdev, static void ipc_client_hmd_get_view_pose(struct xrt_device *xdev, - struct xrt_vec3 *eye_relation, + const struct xrt_vec3 *eye_relation, uint32_t view_index, struct xrt_pose *out_pose) { diff --git a/src/xrt/ipc/server/ipc_server_handler.c b/src/xrt/ipc/server/ipc_server_handler.c index 3d9ecc826..2ce9f94fb 100644 --- a/src/xrt/ipc/server/ipc_server_handler.c +++ b/src/xrt/ipc/server/ipc_server_handler.c @@ -925,10 +925,11 @@ ipc_handle_device_get_hand_tracking(volatile struct ipc_client_state *ics, return XRT_SUCCESS; } + xrt_result_t ipc_handle_device_get_view_pose(volatile struct ipc_client_state *ics, uint32_t id, - struct xrt_vec3 *eye_relation, + const struct xrt_vec3 *eye_relation, uint32_t view_index, struct xrt_pose *out_pose) { diff --git a/src/xrt/ipc/shared/proto.json b/src/xrt/ipc/shared/proto.json index cdd6dd936..d069e39cd 100644 --- a/src/xrt/ipc/shared/proto.json +++ b/src/xrt/ipc/shared/proto.json @@ -200,7 +200,7 @@ "device_get_view_pose": { "in": [ {"name": "id", "type": "uint32_t"}, - {"name": "eye_relation", "type": "struct xrt_vec3"}, + {"name": "eye_relation", "type": "const struct xrt_vec3"}, {"name": "view_index", "type": "uint32_t"} ], "out": [