mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-30 18:38:32 +00:00
st/oxr: Word choice/clarity
This commit is contained in:
parent
26b522d1d2
commit
a25bb73921
|
@ -351,7 +351,7 @@ oxr_hand_tracker_create(struct oxr_logger *log,
|
|||
}
|
||||
}
|
||||
|
||||
// Sanity checking.
|
||||
// Consistency checking.
|
||||
if (xdev != NULL && hand_tracker->xdev == NULL) {
|
||||
oxr_warn(log, "We got hand tracking xdev but it didn't have a hand tracking input.");
|
||||
}
|
||||
|
|
|
@ -527,11 +527,11 @@ oxr_action_get_input_source_localized_name(struct oxr_logger *log,
|
|||
add_string(temp, sizeof(temp), ¤t, oip->localized_name);
|
||||
}
|
||||
|
||||
//! @todo This implementation is very very very ugly.
|
||||
//! @todo This implementation is very very very inelegant.
|
||||
if ((getInfo->whichComponents & XR_INPUT_SOURCE_LOCALIZED_NAME_COMPONENT_BIT) != 0) {
|
||||
/*
|
||||
* The above enum is miss-named it should be called identifier
|
||||
* instead of component.
|
||||
* The preceding enum is misnamed: it should be called identifier
|
||||
* instead of component. But, this is a spec bug.
|
||||
*/
|
||||
add_string(temp, sizeof(temp), ¤t,
|
||||
get_identifier_str_in_profile(log, sess->sys->inst, getInfo->sourcePath, oip));
|
||||
|
|
|
@ -778,7 +778,7 @@ oxr_action_attachment_bind(struct oxr_logger *log,
|
|||
if (sess->sys->inst->debug_bindings) {
|
||||
oxr_log_slog(log, &slog);
|
||||
} else {
|
||||
oxr_slog_abort(&slog);
|
||||
oxr_slog_cancel(&slog);
|
||||
}
|
||||
|
||||
return XR_SUCCESS;
|
||||
|
|
|
@ -91,7 +91,7 @@ struct oxr_input_transform_threshold_data
|
|||
//! The "greater-than" threshold value
|
||||
float threshold;
|
||||
|
||||
//! If true, values above threshold are false instead of
|
||||
//! If true, values greater than `threshold` are false instead of
|
||||
//! true
|
||||
bool invert;
|
||||
};
|
||||
|
@ -275,8 +275,7 @@ oxr_input_transform_init_bool_to_vec1(struct oxr_input_transform *transform,
|
|||
/*!
|
||||
* Create a transform array to convert @p input_type to @p result_type.
|
||||
*
|
||||
* @todo In the future, this should be configured using knowledge from the
|
||||
* device as well as user options.
|
||||
* @todo This should be configured using knowledge from the device as well as user options/policy.
|
||||
*
|
||||
* @param[in] log The logger
|
||||
* @param[in] slog The sink logger
|
||||
|
|
|
@ -50,8 +50,8 @@ is_fmt_func_arg_start(const char *fmt)
|
|||
* Prints the first part of a logging message, has three forms.
|
||||
*
|
||||
* ```c++
|
||||
* print_prefix(l, "(myInfo->foo) is bad", "XR_ERROR_VALIDATION_FAILURE");
|
||||
* // XR_ERROR_VALIDATION_FAILURE: xrMyFunc(myInfo->foo) is bad
|
||||
* print_prefix(l, "(myInfo->memberName) is bad", "XR_ERROR_VALIDATION_FAILURE");
|
||||
* // XR_ERROR_VALIDATION_FAILURE: xrMyFunc(myInfo->memberName) is bad
|
||||
*
|
||||
* print_prefix(l, "This is bad", "XR_ERROR_VALIDATION_FAILURE");
|
||||
* // XR_ERROR_VALIDATION_FAILURE in xrMyFunc: This is bad
|
||||
|
@ -240,7 +240,7 @@ oxr_slog_add_array(struct oxr_sink_logger *slog, const char *str, size_t size)
|
|||
}
|
||||
|
||||
void
|
||||
oxr_slog_abort(struct oxr_sink_logger *slog)
|
||||
oxr_slog_cancel(struct oxr_sink_logger *slog)
|
||||
{
|
||||
slog_free_store(slog);
|
||||
}
|
||||
|
|
|
@ -114,10 +114,10 @@ oxr_slog_dg(struct oxr_sink_logger *slog)
|
|||
}
|
||||
|
||||
/*!
|
||||
* Abort logging, frees all internal data.
|
||||
* Cancel logging, frees all internal data.
|
||||
*/
|
||||
void
|
||||
oxr_slog_abort(struct oxr_sink_logger *slog);
|
||||
oxr_slog_cancel(struct oxr_sink_logger *slog);
|
||||
|
||||
/*!
|
||||
* Flush sink as a log message, frees all internal data.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// SPDX-License-Identifier: BSL-1.0
|
||||
/*!
|
||||
* @file
|
||||
* @brief Contains the instance struct that a lot of things hang from.
|
||||
* @brief The objects representing OpenXR handles, and prototypes for internal functions used in the state tracker.
|
||||
* @author Jakob Bornecrantz <jakob@collabora.com>
|
||||
* @ingroup oxr_main
|
||||
*/
|
||||
|
@ -1151,7 +1151,7 @@ struct oxr_handle_base
|
|||
|
||||
/*!
|
||||
* Single or multiple devices grouped together to form a system that sessions
|
||||
* can be created from. Might need to open devices in order to get all
|
||||
* can be created from. Might need to open devices to get all
|
||||
* properties from it, but shouldn't.
|
||||
*
|
||||
* Not strictly an object, but an atom.
|
||||
|
@ -1571,7 +1571,7 @@ struct oxr_subaction_paths
|
|||
*
|
||||
* This structure has no pointer to the @ref oxr_action_set that created it
|
||||
* because the application is allowed to destroy an action before the session,
|
||||
* which should change nothing except not allow the application to access the
|
||||
* which should change nothing except not allow the application to use the
|
||||
* corresponding data anymore.
|
||||
*
|
||||
* @ingroup oxr_input
|
||||
|
|
|
@ -365,7 +365,7 @@ oxr_session_locate_views(struct oxr_logger *log,
|
|||
oxr_slog(&slog, "\n\tReturning invalid poses");
|
||||
oxr_log_slog(log, &slog);
|
||||
} else {
|
||||
oxr_slog_abort(&slog);
|
||||
oxr_slog_cancel(&slog);
|
||||
}
|
||||
|
||||
return XR_SUCCESS;
|
||||
|
@ -426,7 +426,7 @@ oxr_session_locate_views(struct oxr_logger *log,
|
|||
struct xrt_quat *q = &pose->orientation;
|
||||
struct xrt_quat norm = *q;
|
||||
math_quat_normalize(&norm);
|
||||
oxr_slog_abort(&slog);
|
||||
oxr_slog_cancel(&slog);
|
||||
return oxr_error(log, XR_ERROR_RUNTIME_FAILURE,
|
||||
"Quaternion %a %a %a %a (normalized %a %a %a %a) "
|
||||
"in xrLocateViews was invalid",
|
||||
|
@ -443,7 +443,7 @@ oxr_session_locate_views(struct oxr_logger *log,
|
|||
if (print) {
|
||||
oxr_log_slog(log, &slog);
|
||||
} else {
|
||||
oxr_slog_abort(&slog);
|
||||
oxr_slog_cancel(&slog);
|
||||
}
|
||||
|
||||
return oxr_session_success_result(sess);
|
||||
|
|
|
@ -423,7 +423,7 @@ oxr_space_locate(
|
|||
oxr_slog(&slog, "\n\tReturning invalid pose");
|
||||
oxr_log_slog(log, &slog);
|
||||
} else {
|
||||
oxr_slog_abort(&slog);
|
||||
oxr_slog_cancel(&slog);
|
||||
}
|
||||
|
||||
return XR_SUCCESS;
|
||||
|
@ -476,7 +476,7 @@ oxr_space_locate(
|
|||
oxr_pp_relation_indented(&slog, &result, "relation");
|
||||
oxr_log_slog(log, &slog);
|
||||
} else {
|
||||
oxr_slog_abort(&slog);
|
||||
oxr_slog_cancel(&slog);
|
||||
}
|
||||
|
||||
return oxr_session_success_result(spc->sess);
|
||||
|
|
|
@ -106,7 +106,7 @@ oxr_verify_localized_name(struct oxr_logger *log, const char *string, uint32_t a
|
|||
name);
|
||||
}
|
||||
|
||||
// Future work: validate well-formed UTF-8?
|
||||
/// @todo validate well-formed UTF-8?
|
||||
return XR_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -209,9 +209,9 @@ oxr_verify_full_path(struct oxr_logger *log, const char *path, size_t length, co
|
|||
// Empty string
|
||||
return oxr_error(log, XR_ERROR_PATH_FORMAT_INVALID, "(%s) a empty string is not a valid path", name);
|
||||
case VERIFY_SLASH:
|
||||
// Is this '/foo/' or '/'
|
||||
// Is this '/path_component/' or '/'
|
||||
if (length > 1) {
|
||||
// It was '/foo/'
|
||||
// It was '/path_component/'
|
||||
return XR_SUCCESS;
|
||||
}
|
||||
// It was '/'
|
||||
|
@ -223,7 +223,7 @@ oxr_verify_full_path(struct oxr_logger *log, const char *path, size_t length, co
|
|||
name);
|
||||
|
||||
case VERIFY_MIDDLE:
|
||||
// '/foo/bar' okay!
|
||||
// '/path_component/trailing_path_component' okay!
|
||||
return XR_SUCCESS;
|
||||
default:
|
||||
// We should not end up here.
|
||||
|
|
|
@ -247,7 +247,6 @@ vk_get_device_ext_props(struct oxr_logger *log,
|
|||
oxr_error(log, XR_ERROR_RUNTIME_FAILURE, "Failed to enumerate device extension properties (%d)", res);
|
||||
}
|
||||
|
||||
// Check above returns on failure.
|
||||
*out_props = props;
|
||||
*out_prop_count = prop_count;
|
||||
|
||||
|
|
Loading…
Reference in a new issue