Use u_str_xrt_result for pretty-printing xrt_result
This commit is contained in:
@@ -66,14 +66,6 @@
|
||||
#include "solarxr_interface.h"
|
||||
#endif
|
||||
|
||||
static std::string xrt_result_to_string(xrt_result_t xret)
|
||||
{
|
||||
struct u_pp_sink_stack_only sink;
|
||||
u_pp_delegate_t dg = u_pp_sink_stack_only_init(&sink);
|
||||
u_pp_xrt_result(dg, xret);
|
||||
return sink.buffer;
|
||||
}
|
||||
|
||||
namespace wivrn
|
||||
{
|
||||
|
||||
@@ -331,7 +323,7 @@ xrt_result_t wivrn::wivrn_session::create_session(std::unique_ptr<wivrn_connecti
|
||||
auto xret = comp_main_create_system_compositor(&self->hmd, &ctf, &self->app_pacers, out_xsysc);
|
||||
if (xret != XRT_SUCCESS)
|
||||
{
|
||||
U_LOG_E("Failed to create system compositor: %s", xrt_result_to_string(xret).c_str());
|
||||
U_LOG_E("Failed to create system compositor: %s", u_str_xrt_result(xret));
|
||||
return xret;
|
||||
}
|
||||
self->system_compositor = *out_xsysc;
|
||||
@@ -361,7 +353,7 @@ xrt_result_t wivrn::wivrn_session::create_session(std::unique_ptr<wivrn_connecti
|
||||
}
|
||||
if (res != XRT_SUCCESS)
|
||||
{
|
||||
U_LOG_W("failed to initialize eye tracker: %s", xrt_result_to_string(res).c_str());
|
||||
U_LOG_W("failed to initialize eye tracker: %s", u_str_xrt_result(xret));
|
||||
self->static_roles.eyes = nullptr;
|
||||
self->eye_tracker.reset();
|
||||
}
|
||||
@@ -946,7 +938,7 @@ void wivrn_session::operator()(const from_headset::stop_application & req)
|
||||
xrt_result_t xret = xrt_session_request_exit(t.ics.xs);
|
||||
if (xret != XRT_SUCCESS)
|
||||
{
|
||||
U_LOG_W("Failed to request exit for application %s: %s", t.ics.client_state.info.application_name, xrt_result_to_string(xret).c_str());
|
||||
U_LOG_W("Failed to request exit for application %s: %s", t.ics.client_state.info.application_name, u_str_xrt_result(xret));
|
||||
}
|
||||
|
||||
auto when = os_monotonic_get_ns() + 10l * U_TIME_1S_IN_NS;
|
||||
|
||||
Reference in New Issue
Block a user