mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-02-15 02:00:22 +00:00
ipc: Transfer xdev serial over ipc
This commit is contained in:
parent
28dc5747e2
commit
6a01170b23
src/xrt/ipc
|
@ -166,6 +166,7 @@ ipc_client_device_create(struct ipc_connection *ipc_c, struct xrt_tracking_origi
|
|||
|
||||
// Print name.
|
||||
snprintf(icd->base.str, XRT_DEVICE_NAME_LEN, "%s", isdev->str);
|
||||
snprintf(icd->base.serial, XRT_DEVICE_NAME_LEN, "%s", isdev->serial);
|
||||
|
||||
// Setup inputs, by pointing directly to the shared memory.
|
||||
assert(isdev->input_count > 0);
|
||||
|
|
|
@ -199,6 +199,7 @@ ipc_client_hmd_create(struct ipc_connection *ipc_c, struct xrt_tracking_origin *
|
|||
|
||||
// Print name.
|
||||
snprintf(ich->base.str, XRT_DEVICE_NAME_LEN, "%s", isdev->str);
|
||||
snprintf(ich->base.serial, XRT_DEVICE_NAME_LEN, "%s", isdev->serial);
|
||||
|
||||
// Setup inputs, by pointing directly to the shared memory.
|
||||
assert(isdev->input_count > 0);
|
||||
|
|
|
@ -272,6 +272,7 @@ init_shm(struct ipc_server *s)
|
|||
|
||||
isdev->name = xdev->name;
|
||||
memcpy(isdev->str, xdev->str, sizeof(isdev->str));
|
||||
memcpy(isdev->serial, xdev->serial, sizeof(isdev->serial));
|
||||
|
||||
isdev->orientation_tracking_supported = xdev->orientation_tracking_supported;
|
||||
isdev->position_tracking_supported = xdev->position_tracking_supported;
|
||||
|
|
|
@ -106,6 +106,9 @@ struct ipc_shared_device
|
|||
//! A string describing the device.
|
||||
char str[XRT_DEVICE_NAME_LEN];
|
||||
|
||||
//! A unique identifier. Persistent across configurations, if possible.
|
||||
char serial[XRT_DEVICE_NAME_LEN];
|
||||
|
||||
//! Number of bindings.
|
||||
uint32_t binding_profile_count;
|
||||
//! 'Offset' into the array of bindings where the bindings starts.
|
||||
|
|
Loading…
Reference in a new issue