tangled
alpha
login
or
join now
matrixfurry.com
/
monado
0
fork
atom
The open source OpenXR runtime
0
fork
atom
overview
issues
pulls
pipelines
t/common: Refactor Simulated builder [NFC]
Jakob Bornecrantz
2 years ago
201ea799
fb8c9412
+21
-9
1 changed file
expand all
collapse all
unified
split
src
xrt
targets
common
target_builder_simulated.c
+21
-9
src/xrt/targets/common/target_builder_simulated.c
···
119
119
//! @todo Create a shared tracking origin on the system devices struct instead.
120
120
head->tracking_origin->type = XRT_TRACKING_TYPE_OTHER; // Just anything other then none.
121
121
122
122
-
struct u_system_devices *usysd = u_system_devices_allocate();
123
123
-
usysd->base.roles.head = head;
124
124
-
usysd->base.roles.left = left;
125
125
-
usysd->base.roles.right = right;
122
122
+
struct xrt_system_devices *xsysd = NULL;
123
123
+
{
124
124
+
struct u_system_devices *usysd = u_system_devices_allocate();
125
125
+
xsysd = &usysd->base;
126
126
+
}
126
127
127
127
-
usysd->base.xdevs[usysd->base.xdev_count++] = head;
128
128
+
// Add to device list.
129
129
+
xsysd->xdevs[xsysd->xdev_count++] = head;
128
130
if (left != NULL) {
129
129
-
usysd->base.xdevs[usysd->base.xdev_count++] = left;
131
131
+
xsysd->xdevs[xsysd->xdev_count++] = left;
130
132
}
131
133
if (right != NULL) {
132
132
-
usysd->base.xdevs[usysd->base.xdev_count++] = right;
134
134
+
xsysd->xdevs[xsysd->xdev_count++] = right;
133
135
}
134
136
135
135
-
*out_xsysd = &usysd->base;
136
136
-
u_builder_create_space_overseer(&usysd->base, out_xso);
137
137
+
// Assign to role(s).
138
138
+
xsysd->roles.head = head;
139
139
+
xsysd->roles.left = left;
140
140
+
xsysd->roles.right = right;
141
141
+
142
142
+
143
143
+
/*
144
144
+
* Done.
145
145
+
*/
146
146
+
147
147
+
*out_xsysd = xsysd;
148
148
+
u_builder_create_space_overseer(xsysd, out_xso);
137
149
138
150
return XRT_SUCCESS;
139
151
}