The open source OpenXR runtime
0
fork

Configure Feed

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

xrt: Tidy xrt_device [NFC]

+27 -17
+27 -17
src/xrt/include/xrt/xrt_device.h
··· 264 264 bool force_feedback_supported; 265 265 bool form_factor_check_supported; 266 266 267 + 268 + /* 269 + * 270 + * Functions. 271 + * 272 + */ 273 + 267 274 /*! 268 275 * Update any attached inputs. 269 276 * ··· 411 418 struct xrt_visibility_mask **out_mask); 412 419 413 420 /*! 414 - * Destroy device. 415 - */ 416 - void (*destroy)(struct xrt_device *xdev); 417 - 418 - /*! 419 421 * @brief Check if given form factor is available or not. 420 422 * 421 423 * This should only be used in HMD device, if the device driver supports form factor check. ··· 426 428 * @return true if given form factor is available; otherwise false. 427 429 */ 428 430 bool (*is_form_factor_available)(struct xrt_device *xdev, enum xrt_form_factor form_factor); 431 + 432 + /*! 433 + * Destroy device. 434 + */ 435 + void (*destroy)(struct xrt_device *xdev); 436 + 437 + // Add new functions above destroy. 429 438 }; 430 439 431 440 /*! ··· 537 546 } 538 547 539 548 /*! 549 + * Helper function for @ref xrt_device::is_form_factor_available. 550 + * 551 + * @copydoc xrt_device::is_form_factor_available 552 + * 553 + * @public @memberof xrt_device 554 + */ 555 + static inline bool 556 + xrt_device_is_form_factor_available(struct xrt_device *xdev, enum xrt_form_factor form_factor) 557 + { 558 + return xdev->is_form_factor_available(xdev, form_factor); 559 + } 560 + 561 + /*! 540 562 * Helper function for @ref xrt_device::destroy. 541 563 * 542 564 * Handles nulls, sets your pointer to null. ··· 555 577 *xdev_ptr = NULL; 556 578 } 557 579 558 - /*! 559 - * Helper function for @ref xrt_device::is_form_factor_available. 560 - * 561 - * @copydoc xrt_device::is_form_factor_available 562 - * 563 - * @public @memberof xrt_device 564 - */ 565 - static inline bool 566 - xrt_device_is_form_factor_available(struct xrt_device *xdev, enum xrt_form_factor form_factor) 567 - { 568 - return xdev->is_form_factor_available(xdev, form_factor); 569 - } 570 580 571 581 #ifdef __cplusplus 572 582 } // extern "C"