Monado OpenXR Runtime
Loading...
Searching...
No Matches
openvr_error.hpp
Go to the documentation of this file.
1
// Copyright 2026, Beyley Cardellio
2
// SPDX-License-Identifier: BSL-1.0
3
/*!
4
* @file
5
* @brief Implementation of error code conversion for OpenVR.
6
*
7
* @author Beyley Cardellio <ep1cm1n10n123@gmail.com>
8
* @ingroup openvr_common
9
*/
10
11
#pragma once
12
13
#include "
xrt/xrt_results.h
"
14
15
#include "openvr_interfaces_unified.h"
16
17
#include "
openvr_logger.hpp
"
18
19
20
namespace
xrt::state_trackers::openvr {
21
22
//! Helper macro to set an OpenVR error pointer if it's not null.
23
#define SET_ERROR(error_ptr, ERROR) \
24
do { \
25
if (error_ptr) { \
26
*error_ptr = ERROR; \
27
} \
28
} while (false)
29
30
/*!
31
* Converts an xrt_result_t to a vr::EVRInitError.
32
*
33
* @param xret The xrt_result_t to convert.
34
* @return The corresponding vr::EVRInitError.
35
*/
36
vr::EVRInitError
37
xret_to_init_error(
xrt_result_t
xret);
38
39
/*!
40
* Converts an xrt_result_t to a vr::EVRCompositorError.
41
*
42
* @param xret The xrt_result_t to convert.
43
* @return The corresponding vr::EVRCompositorError.
44
*/
45
vr::EVRCompositorError
46
xret_to_compositor_error(
xrt_result_t
xret);
47
48
};
// namespace xrt::state_trackers::openvr
xrt_result_t
enum xrt_result xrt_result_t
Result type used across Monado.
openvr_logger.hpp
Logging functions.
xrt_results.h
Internal result type for XRT.
state_trackers
openvr
common
openvr_error.hpp
Generated by
1.9.8