The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

t/common: Refactor QWERTY builder [NFC]

+21 -9
+21 -9
src/xrt/targets/common/target_builder_qwerty.c
··· 87 87 return xret; 88 88 } 89 89 90 - struct u_system_devices *usysd = u_system_devices_allocate(); 91 - usysd->base.roles.head = head; 92 - usysd->base.roles.left = left; 93 - usysd->base.roles.right = right; 90 + struct xrt_system_devices *xsysd = NULL; 91 + { 92 + struct u_system_devices *usysds = u_system_devices_allocate(); 93 + xsysd = &usysds->base; 94 + } 94 95 95 - usysd->base.xdevs[usysd->base.xdev_count++] = head; 96 + // Add to device list. 97 + xsysd->xdevs[xsysd->xdev_count++] = head; 96 98 if (left != NULL) { 97 - usysd->base.xdevs[usysd->base.xdev_count++] = left; 99 + xsysd->xdevs[xsysd->xdev_count++] = left; 98 100 } 99 101 if (right != NULL) { 100 - usysd->base.xdevs[usysd->base.xdev_count++] = right; 102 + xsysd->xdevs[xsysd->xdev_count++] = right; 101 103 } 102 104 103 - *out_xsysd = &usysd->base; 104 - u_builder_create_space_overseer(&usysd->base, out_xso); 105 + // Assign to role(s). 106 + xsysd->roles.head = head; 107 + xsysd->roles.left = left; 108 + xsysd->roles.right = right; 109 + 110 + 111 + /* 112 + * Done. 113 + */ 114 + 115 + *out_xsysd = xsysd; 116 + u_builder_create_space_overseer(xsysd, out_xso); 105 117 106 118 return XRT_SUCCESS; 107 119 }