mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2024-12-29 11:06:18 +00:00
u/pp: Tidy and add more enums
This commit is contained in:
parent
5d31fa7fe1
commit
6a4d8530a6
|
@ -115,8 +115,12 @@ u_pp_xrt_input_name(struct u_pp_delegate dg, enum xrt_input_name name)
|
|||
case XRT_INPUT_GENERIC_HAND_TRACKING_LEFT: DG("XRT_INPUT_GENERIC_HAND_TRACKING_LEFT"); return;
|
||||
case XRT_INPUT_GENERIC_HAND_TRACKING_RIGHT: DG("XRT_INPUT_GENERIC_HAND_TRACKING_RIGHT"); return;
|
||||
case XRT_INPUT_GENERIC_TRACKER_POSE: DG("XRT_INPUT_GENERIC_TRACKER_POSE"); return;
|
||||
case XRT_INPUT_GENERIC_EYE_GAZE_POSE: DG("XRT_INPUT_GENERIC_EYE_GAZE_POSE"); return;
|
||||
case XRT_INPUT_GENERIC_PALM_POSE: DG("XRT_INPUT_GENERIC_PALM_POSE"); return;
|
||||
case XRT_INPUT_GENERIC_EYE_GAZE_POSE: DG("XRT_INPUT_GENERIC_EYE_GAZE_POSE"); return;
|
||||
case XRT_INPUT_GENERIC_LOCAL_SPACE_POSE: DG("XRT_INPUT_GENERIC_LOCAL_SPACE_POSE"); return;
|
||||
case XRT_INPUT_GENERIC_LOCAL_FLOOR_SPACE_POSE: DG("XRT_INPUT_GENERIC_LOCAL_FLOOR_SPACE_POSE"); return;
|
||||
case XRT_INPUT_GENERIC_STAGE_SPACE_POSE: DG("XRT_INPUT_GENERIC_STAGE_SPACE_POSE"); return;
|
||||
case XRT_INPUT_GENERIC_UNBOUNDED_SPACE_POSE: DG("XRT_INPUT_GENERIC_UNBOUNDED_SPACE_POSE"); return;
|
||||
case XRT_INPUT_SIMPLE_SELECT_CLICK: DG("XRT_INPUT_SIMPLE_SELECT_CLICK"); return;
|
||||
case XRT_INPUT_SIMPLE_MENU_CLICK: DG("XRT_INPUT_SIMPLE_MENU_CLICK"); return;
|
||||
case XRT_INPUT_SIMPLE_GRIP_POSE: DG("XRT_INPUT_SIMPLE_GRIP_POSE"); return;
|
||||
|
@ -195,6 +199,7 @@ u_pp_xrt_input_name(struct u_pp_delegate dg, enum xrt_input_name name)
|
|||
case XRT_INPUT_WMR_TRACKPAD: DG("XRT_INPUT_WMR_TRACKPAD"); return;
|
||||
case XRT_INPUT_WMR_GRIP_POSE: DG("XRT_INPUT_WMR_GRIP_POSE"); return;
|
||||
case XRT_INPUT_WMR_AIM_POSE: DG("XRT_INPUT_WMR_AIM_POSE"); return;
|
||||
case XRT_INPUT_WMR_HOME_CLICK: DG("XRT_INPUT_WMR_HOME_CLICK"); return;
|
||||
case XRT_INPUT_XBOX_MENU_CLICK: DG("XRT_INPUT_XBOX_MENU_CLICK"); return;
|
||||
case XRT_INPUT_XBOX_VIEW_CLICK: DG("XRT_INPUT_XBOX_VIEW_CLICK"); return;
|
||||
case XRT_INPUT_XBOX_A_CLICK: DG("XRT_INPUT_XBOX_A_CLICK"); return;
|
||||
|
@ -255,6 +260,7 @@ u_pp_xrt_input_name(struct u_pp_delegate dg, enum xrt_input_name name)
|
|||
case XRT_INPUT_G2_CONTROLLER_THUMBSTICK: DG("XRT_INPUT_G2_CONTROLLER_THUMBSTICK"); return;
|
||||
case XRT_INPUT_G2_CONTROLLER_GRIP_POSE: DG("XRT_INPUT_G2_CONTROLLER_GRIP_POSE"); return;
|
||||
case XRT_INPUT_G2_CONTROLLER_AIM_POSE: DG("XRT_INPUT_G2_CONTROLLER_AIM_POSE"); return;
|
||||
case XRT_INPUT_G2_CONTROLLER_HOME_CLICK: DG("XRT_INPUT_G2_CONTROLLER_HOME_CLICK"); return;
|
||||
case XRT_INPUT_ODYSSEY_CONTROLLER_MENU_CLICK: DG("XRT_INPUT_ODYSSEY_CONTROLLER_MENU_CLICK"); return;
|
||||
case XRT_INPUT_ODYSSEY_CONTROLLER_SQUEEZE_CLICK: DG("XRT_INPUT_ODYSSEY_CONTROLLER_SQUEEZE_CLICK"); return;
|
||||
case XRT_INPUT_ODYSSEY_CONTROLLER_TRIGGER_VALUE: DG("XRT_INPUT_ODYSSEY_CONTROLLER_TRIGGER_VALUE"); return;
|
||||
|
@ -265,6 +271,8 @@ u_pp_xrt_input_name(struct u_pp_delegate dg, enum xrt_input_name name)
|
|||
case XRT_INPUT_ODYSSEY_CONTROLLER_TRACKPAD: DG("XRT_INPUT_ODYSSEY_CONTROLLER_TRACKPAD"); return;
|
||||
case XRT_INPUT_ODYSSEY_CONTROLLER_GRIP_POSE: DG("XRT_INPUT_ODYSSEY_CONTROLLER_GRIP_POSE"); return;
|
||||
case XRT_INPUT_ODYSSEY_CONTROLLER_AIM_POSE: DG("XRT_INPUT_ODYSSEY_CONTROLLER_AIM_POSE"); return;
|
||||
case XRT_INPUT_G2_CONTROLLER_SQUEEZE_CLICK: DG("XRT_INPUT_G2_CONTROLLER_SQUEEZE_CLICK"); return;
|
||||
case XRT_INPUT_ODYSSEY_CONTROLLER_HOME_CLICK: DG("XRT_INPUT_ODYSSEY_CONTROLLER_HOME_CLICK"); return;
|
||||
case XRT_INPUT_ML2_CONTROLLER_MENU_CLICK: DG("XRT_INPUT_ML2_CONTROLLER_MENU_CLICK"); return;
|
||||
case XRT_INPUT_ML2_CONTROLLER_SELECT_CLICK: DG("XRT_INPUT_ML2_CONTROLLER_SELECT_CLICK"); return;
|
||||
case XRT_INPUT_ML2_CONTROLLER_TRIGGER_CLICK: DG("XRT_INPUT_ML2_CONTROLLER_TRIGGER_CLICK"); return;
|
||||
|
@ -276,6 +284,38 @@ u_pp_xrt_input_name(struct u_pp_delegate dg, enum xrt_input_name name)
|
|||
case XRT_INPUT_ML2_CONTROLLER_GRIP_POSE: DG("XRT_INPUT_ML2_CONTROLLER_GRIP_POSE"); return;
|
||||
case XRT_INPUT_ML2_CONTROLLER_AIM_POSE: DG("XRT_INPUT_ML2_CONTROLLER_AIM_POSE"); return;
|
||||
case XRT_INPUT_ML2_CONTROLLER_SHOULDER_CLICK: DG("XRT_INPUT_ML2_CONTROLLER_SHOULDER_CLICK"); return;
|
||||
case XRT_INPUT_VIVE_TRACKER_SYSTEM_CLICK: DG("XRT_INPUT_VIVE_TRACKER_SYSTEM_CLICK"); return;
|
||||
case XRT_INPUT_VIVE_TRACKER_MENU_CLICK: DG("XRT_INPUT_VIVE_TRACKER_MENU_CLICK"); return;
|
||||
case XRT_INPUT_VIVE_TRACKER_TRIGGER_CLICK: DG("XRT_INPUT_VIVE_TRACKER_TRIGGER_CLICK"); return;
|
||||
case XRT_INPUT_VIVE_TRACKER_SQUEEZE_CLICK: DG("XRT_INPUT_VIVE_TRACKER_SQUEEZE_CLICK"); return;
|
||||
case XRT_INPUT_VIVE_TRACKER_TRIGGER_VALUE: DG("XRT_INPUT_VIVE_TRACKER_TRIGGER_VALUE"); return;
|
||||
case XRT_INPUT_VIVE_TRACKER_TRACKPAD: DG("XRT_INPUT_VIVE_TRACKER_TRACKPAD"); return;
|
||||
case XRT_INPUT_VIVE_TRACKER_TRACKPAD_CLICK: DG("XRT_INPUT_VIVE_TRACKER_TRACKPAD_CLICK"); return;
|
||||
case XRT_INPUT_VIVE_TRACKER_TRACKPAD_TOUCH: DG("XRT_INPUT_VIVE_TRACKER_TRACKPAD_TOUCH"); return;
|
||||
case XRT_INPUT_VIVE_TRACKER_GRIP_POSE: DG("XRT_INPUT_VIVE_TRACKER_GRIP_POSE"); return;
|
||||
case XRT_INPUT_PSSENSE_PS_CLICK: DG("XRT_INPUT_PSSENSE_PS_CLICK"); return;
|
||||
case XRT_INPUT_PSSENSE_SHARE_CLICK: DG("XRT_INPUT_PSSENSE_SHARE_CLICK"); return;
|
||||
case XRT_INPUT_PSSENSE_OPTIONS_CLICK: DG("XRT_INPUT_PSSENSE_OPTIONS_CLICK"); return;
|
||||
case XRT_INPUT_PSSENSE_SQUARE_CLICK: DG("XRT_INPUT_PSSENSE_SQUARE_CLICK"); return;
|
||||
case XRT_INPUT_PSSENSE_SQUARE_TOUCH: DG("XRT_INPUT_PSSENSE_SQUARE_TOUCH"); return;
|
||||
case XRT_INPUT_PSSENSE_TRIANGLE_CLICK: DG("XRT_INPUT_PSSENSE_TRIANGLE_CLICK"); return;
|
||||
case XRT_INPUT_PSSENSE_TRIANGLE_TOUCH: DG("XRT_INPUT_PSSENSE_TRIANGLE_TOUCH"); return;
|
||||
case XRT_INPUT_PSSENSE_CROSS_CLICK: DG("XRT_INPUT_PSSENSE_CROSS_CLICK"); return;
|
||||
case XRT_INPUT_PSSENSE_CROSS_TOUCH: DG("XRT_INPUT_PSSENSE_CROSS_TOUCH"); return;
|
||||
case XRT_INPUT_PSSENSE_CIRCLE_CLICK: DG("XRT_INPUT_PSSENSE_CIRCLE_CLICK"); return;
|
||||
case XRT_INPUT_PSSENSE_CIRCLE_TOUCH: DG("XRT_INPUT_PSSENSE_CIRCLE_TOUCH"); return;
|
||||
case XRT_INPUT_PSSENSE_SQUEEZE_CLICK: DG("XRT_INPUT_PSSENSE_SQUEEZE_CLICK"); return;
|
||||
case XRT_INPUT_PSSENSE_SQUEEZE_TOUCH: DG("XRT_INPUT_PSSENSE_SQUEEZE_TOUCH"); return;
|
||||
case XRT_INPUT_PSSENSE_SQUEEZE_PROXIMITY: DG("XRT_INPUT_PSSENSE_SQUEEZE_PROXIMITY"); return;
|
||||
case XRT_INPUT_PSSENSE_TRIGGER_CLICK: DG("XRT_INPUT_PSSENSE_TRIGGER_CLICK"); return;
|
||||
case XRT_INPUT_PSSENSE_TRIGGER_TOUCH: DG("XRT_INPUT_PSSENSE_TRIGGER_TOUCH"); return;
|
||||
case XRT_INPUT_PSSENSE_TRIGGER_VALUE: DG("XRT_INPUT_PSSENSE_TRIGGER_VALUE"); return;
|
||||
case XRT_INPUT_PSSENSE_TRIGGER_PROXIMITY: DG("XRT_INPUT_PSSENSE_TRIGGER_PROXIMITY"); return;
|
||||
case XRT_INPUT_PSSENSE_THUMBSTICK: DG("XRT_INPUT_PSSENSE_THUMBSTICK"); return;
|
||||
case XRT_INPUT_PSSENSE_THUMBSTICK_CLICK: DG("XRT_INPUT_PSSENSE_THUMBSTICK_CLICK"); return;
|
||||
case XRT_INPUT_PSSENSE_THUMBSTICK_TOUCH: DG("XRT_INPUT_PSSENSE_THUMBSTICK_TOUCH"); return;
|
||||
case XRT_INPUT_PSSENSE_GRIP_POSE: DG("XRT_INPUT_PSSENSE_GRIP_POSE"); return;
|
||||
case XRT_INPUT_PSSENSE_AIM_POSE: DG("XRT_INPUT_PSSENSE_AIM_POSE"); return;
|
||||
case XRT_INPUT_HAND_PINCH_POSE: DG("XRT_INPUT_HAND_PINCH_POSE"); return;
|
||||
case XRT_INPUT_HAND_POKE_POSE: DG("XRT_INPUT_HAND_POKE_POSE"); return;
|
||||
case XRT_INPUT_HAND_PINCH_VALUE: DG("XRT_INPUT_HAND_PINCH_VALUE"); return;
|
||||
|
@ -284,9 +324,32 @@ u_pp_xrt_input_name(struct u_pp_delegate dg, enum xrt_input_name name)
|
|||
case XRT_INPUT_HAND_PINCH_READY: DG("XRT_INPUT_HAND_PINCH_READY"); return;
|
||||
case XRT_INPUT_HAND_AIM_ACTIVATE_READY: DG("XRT_INPUT_HAND_AIM_ACTIVATE_READY"); return;
|
||||
case XRT_INPUT_HAND_GRASP_READY: DG("XRT_INPUT_HAND_GRASP_READY"); return;
|
||||
default: break;
|
||||
case XRT_INPUT_OPPO_MR_X_CLICK: DG("XRT_INPUT_OPPO_MR_X_CLICK"); return;
|
||||
case XRT_INPUT_OPPO_MR_X_TOUCH: DG("XRT_INPUT_OPPO_MR_X_TOUCH"); return;
|
||||
case XRT_INPUT_OPPO_MR_Y_CLICK: DG("XRT_INPUT_OPPO_MR_Y_CLICK"); return;
|
||||
case XRT_INPUT_OPPO_MR_Y_TOUCH: DG("XRT_INPUT_OPPO_MR_Y_TOUCH"); return;
|
||||
case XRT_INPUT_OPPO_MR_MENU_CLICK: DG("XRT_INPUT_OPPO_MR_MENU_CLICK"); return;
|
||||
case XRT_INPUT_OPPO_MR_HEART_RATE_VALUE: DG("XRT_INPUT_OPPO_MR_HEART_RATE_VALUE"); return;
|
||||
case XRT_INPUT_OPPO_MR_A_CLICK: DG("XRT_INPUT_OPPO_MR_A_CLICK"); return;
|
||||
case XRT_INPUT_OPPO_MR_A_TOUCH: DG("XRT_INPUT_OPPO_MR_A_TOUCH"); return;
|
||||
case XRT_INPUT_OPPO_MR_B_CLICK: DG("XRT_INPUT_OPPO_MR_B_CLICK"); return;
|
||||
case XRT_INPUT_OPPO_MR_B_TOUCH: DG("XRT_INPUT_OPPO_MR_B_TOUCH"); return;
|
||||
case XRT_INPUT_OPPO_MR_HOME_CLICK: DG("XRT_INPUT_OPPO_MR_HOME_CLICK"); return;
|
||||
case XRT_INPUT_OPPO_MR_SQUEEZE_VALUE: DG("XRT_INPUT_OPPO_MR_SQUEEZE_VALUE"); return;
|
||||
case XRT_INPUT_OPPO_MR_TRIGGER_TOUCH: DG("XRT_INPUT_OPPO_MR_TRIGGER_TOUCH"); return;
|
||||
case XRT_INPUT_OPPO_MR_TRIGGER_VALUE: DG("XRT_INPUT_OPPO_MR_TRIGGER_VALUE"); return;
|
||||
case XRT_INPUT_OPPO_MR_GRIP_POSE: DG("XRT_INPUT_OPPO_MR_GRIP_POSE"); return;
|
||||
case XRT_INPUT_OPPO_MR_AIM_POSE: DG("XRT_INPUT_OPPO_MR_AIM_POSE"); return;
|
||||
case XRT_INPUT_OPPO_MR_THUMBSTICK_CLICK: DG("XRT_INPUT_OPPO_MR_THUMBSTICK_CLICK"); return;
|
||||
case XRT_INPUT_OPPO_MR_THUMBSTICK_TOUCH: DG("XRT_INPUT_OPPO_MR_THUMBSTICK_TOUCH"); return;
|
||||
case XRT_INPUT_OPPO_MR_THUMBSTICK: DG("XRT_INPUT_OPPO_MR_THUMBSTICK"); return;
|
||||
}
|
||||
|
||||
/*
|
||||
* No default case so we get warnings of missing entries.
|
||||
* Invalid values handled below.
|
||||
*/
|
||||
|
||||
uint32_t id = XRT_GET_INPUT_ID(name);
|
||||
enum xrt_input_type type = XRT_GET_INPUT_TYPE(name);
|
||||
const char *str = get_xrt_input_type_short_str(type);
|
||||
|
@ -297,8 +360,8 @@ u_pp_xrt_input_name(struct u_pp_delegate dg, enum xrt_input_name name)
|
|||
void
|
||||
u_pp_xrt_result(struct u_pp_delegate dg, xrt_result_t xret)
|
||||
{
|
||||
switch (xret) {
|
||||
// clang-format off
|
||||
switch (xret) {
|
||||
case XRT_SUCCESS: DG("XRT_SUCCESS"); return;
|
||||
case XRT_TIMEOUT: DG("XRT_TIMEOUT"); return;
|
||||
case XRT_ERROR_IPC_FAILURE: DG("XRT_ERROR_IPC_FAILURE"); return;
|
||||
|
@ -327,9 +390,15 @@ u_pp_xrt_result(struct u_pp_delegate dg, xrt_result_t xret)
|
|||
case XRT_ERROR_D3D11: DG("XRT_ERROR_D3D11"); return;
|
||||
case XRT_ERROR_D3D12: DG("XRT_ERROR_D3D12"); return;
|
||||
case XRT_ERROR_RECENTERING_NOT_SUPPORTED: DG("XRT_ERROR_RECENTERING_NOT_SUPPORTED"); return;
|
||||
// clang-format on
|
||||
default: break;
|
||||
case XRT_ERROR_COMPOSITOR_NOT_SUPPORTED: DG("XRT_ERROR_COMPOSITOR_NOT_SUPPORTED"); return;
|
||||
case XRT_ERROR_IPC_COMPOSITOR_NOT_CREATED: DG("XRT_ERROR_IPC_COMPOSITOR_NOT_CREATED"); return;
|
||||
}
|
||||
// clang-format on
|
||||
|
||||
/*
|
||||
* No default case so we get warnings of missing entries.
|
||||
* Invalid values handled below.
|
||||
*/
|
||||
|
||||
if (xret < 0) {
|
||||
u_pp(dg, "XRT_ERROR_0x%08x", xret);
|
||||
|
|
Loading…
Reference in a new issue