The open source OpenXR runtime
0
fork

Configure Feed

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

t/libmonado: fix replace old hand-tracking role name strings

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2522>

+20 -5
+3
src/xrt/targets/libmonado/monado.c
··· 436 436 TO_ENUM("hand-tracking-unobstructed-right", ROLE_HAND_UNOBSTRUCTED_RIGHT) 437 437 TO_ENUM("hand-tracking-conforming-left", ROLE_HAND_CONFORMING_LEFT) 438 438 TO_ENUM("hand-tracking-conforming-right", ROLE_HAND_CONFORMING_RIGHT) 439 + //! *DEPRECATED** following roles name are deprecated, to be removed in the next major version 440 + TO_ENUM("hand-tracking-left", ROLE_HAND_UNOBSTRUCTED_LEFT) 441 + TO_ENUM("hand-tracking-right", ROLE_HAND_UNOBSTRUCTED_RIGHT) 439 442 { 440 443 PE("Invalid role name (%s)", role_name); 441 444 return MND_ERROR_INVALID_VALUE;
+16 -4
src/xrt/targets/libmonado/monado.h
··· 25 25 //! Major version of the API. 26 26 #define MND_API_VERSION_MAJOR 1 27 27 //! Minor version of the API. 28 - #define MND_API_VERSION_MINOR 4 28 + #define MND_API_VERSION_MINOR 5 29 29 //! Patch version of the API. 30 30 #define MND_API_VERSION_PATCH 0 31 31 ··· 359 359 /*! 360 360 * Get the device index associated for a given role name. 361 361 * 362 + * 362 363 * @param root The libmonado state. 363 - * @param role_name Name of the role, one-of: "head", "left", "right", 364 - * "gamepad", "eyes", "hand-tracking-left", and, 365 - * "hand-tracking-right": 364 + * @param role_name Name of the role. Possible values are: 365 + * - "head" 366 + * - "left" 367 + * - "right" 368 + * - "gamepad" 369 + * - "eyes" 370 + * - "hand-tracking-unobstructed-[left|right]" 371 + * - "hand-tracking-conforming-[left|right]" 372 + * 373 + * **DEPRECATED**: The role names "hand-tracking-[left|right]" 374 + * are deprecated as of v1.5. They now map to 375 + * "hand-tracking-unobstructed-[left|right]" and are 376 + * scheduled for removal in v2.0. 377 + * 366 378 * @param[out] out_index Pointer to value to populate with the device index 367 379 * associated with given role name, -1 if not role is set. 368 380 *
+1 -1
src/xrt/targets/libmonado/monado.py
··· 210 210 def get_device_roles(self): 211 211 role_map = dict() 212 212 device_int_id_ptr = self.ffi.new("int32_t *") 213 - for role_name in ["head", "left", "right", "gamepad", "eyes", "hand-tracking-left", "hand-tracking-right"]: 213 + for role_name in ["head", "left", "right", "gamepad", "eyes", "hand-tracking-unobstructed-left", "hand-tracking-unobstructed-right", "hand-tracking-conforming-left", "hand-tracking-conforming-right"]: 214 214 crole_name = role_name.encode('utf-8') 215 215 ret = self.lib.mnd_root_get_device_from_role(self.root, crole_name, device_int_id_ptr) 216 216 if ret != 0: