st/oxr: Code style, pointer star location

This commit is contained in:
Jakob Bornecrantz 2019-09-29 11:43:45 +01:00
parent 0987927343
commit 76527b73f8
13 changed files with 567 additions and 567 deletions

View file

@ -26,9 +26,9 @@
*/
XrResult
oxr_xrSyncActions(XrSession session, const XrActionsSyncInfo* syncInfo)
oxr_xrSyncActions(XrSession session, const XrActionsSyncInfo *syncInfo)
{
struct oxr_session* sess;
struct oxr_session *sess;
struct oxr_logger log;
OXR_VERIFY_SESSION_AND_INIT_LOG(&log, session, sess, "xrSyncActions");
OXR_VERIFY_ARG_TYPE_AND_NULL(&log, syncInfo, XR_TYPE_ACTIONS_SYNC_INFO);
@ -39,7 +39,7 @@ oxr_xrSyncActions(XrSession session, const XrActionsSyncInfo* syncInfo)
}
for (uint32_t i = 0; i < syncInfo->countActiveActionSets; i++) {
struct oxr_action_set* act_set = NULL;
struct oxr_action_set *act_set = NULL;
OXR_VERIFY_ACTIONSET_NOT_NULL(
&log, syncInfo->activeActionSets[i].actionSet, act_set);
@ -54,9 +54,9 @@ oxr_xrSyncActions(XrSession session, const XrActionsSyncInfo* syncInfo)
XrResult
oxr_xrAttachSessionActionSets(XrSession session,
const XrSessionActionSetsAttachInfo* bindInfo)
const XrSessionActionSetsAttachInfo *bindInfo)
{
struct oxr_session* sess;
struct oxr_session *sess;
struct oxr_logger log;
OXR_VERIFY_SESSION_AND_INIT_LOG(&log, session, sess,
"xrAttachSessionActionSets");
@ -64,7 +64,7 @@ oxr_xrAttachSessionActionSets(XrSession session,
XR_TYPE_SESSION_ACTION_SETS_ATTACH_INFO);
for (uint32_t i = 0; i < bindInfo->countActionSets; i++) {
struct oxr_action_set* act_set = NULL;
struct oxr_action_set *act_set = NULL;
OXR_VERIFY_ACTIONSET_NOT_NULL(&log, bindInfo->actionSets[i],
act_set);
}
@ -75,9 +75,9 @@ oxr_xrAttachSessionActionSets(XrSession session,
XrResult
oxr_xrSuggestInteractionProfileBindings(
XrInstance instance,
const XrInteractionProfileSuggestedBinding* suggestedBindings)
const XrInteractionProfileSuggestedBinding *suggestedBindings)
{
struct oxr_instance* inst;
struct oxr_instance *inst;
struct oxr_logger log;
OXR_VERIFY_INSTANCE_AND_INIT_LOG(&log, instance, inst,
"xrSuggestInteractionProfileBindings");
@ -86,10 +86,10 @@ oxr_xrSuggestInteractionProfileBindings(
XR_TYPE_INTERACTION_PROFILE_SUGGESTED_BINDING);
for (size_t i = 0; i < suggestedBindings->countSuggestedBindings; i++) {
const XrActionSuggestedBinding* s =
const XrActionSuggestedBinding *s =
&suggestedBindings->suggestedBindings[i];
struct oxr_action* dummy;
struct oxr_action *dummy;
OXR_VERIFY_ACTION_NOT_NULL(&log, s->action, dummy);
//! @todo verify path (s->binding).
@ -103,9 +103,9 @@ XrResult
oxr_xrGetCurrentInteractionProfile(
XrSession session,
XrPath topLevelUserPath,
XrInteractionProfileState* interactionProfile)
XrInteractionProfileState *interactionProfile)
{
struct oxr_session* sess;
struct oxr_session *sess;
struct oxr_logger log;
OXR_VERIFY_SESSION_AND_INIT_LOG(&log, session, sess,
"xrGetCurrentInteractionProfile");
@ -119,12 +119,12 @@ oxr_xrGetCurrentInteractionProfile(
XrResult
oxr_xrGetInputSourceLocalizedName(
XrSession session,
const XrInputSourceLocalizedNameGetInfo* getInfo,
const XrInputSourceLocalizedNameGetInfo *getInfo,
uint32_t bufferCapacityInput,
uint32_t* bufferCountOutput,
char* buffer)
uint32_t *bufferCountOutput,
char *buffer)
{
struct oxr_session* sess;
struct oxr_session *sess;
struct oxr_logger log;
OXR_VERIFY_SESSION_AND_INIT_LOG(&log, session, sess,
"xrGetInputSourceLocalizedName");
@ -144,11 +144,11 @@ oxr_xrGetInputSourceLocalizedName(
XrResult
oxr_xrCreateActionSet(XrInstance instance,
const XrActionSetCreateInfo* createInfo,
XrActionSet* actionSet)
const XrActionSetCreateInfo *createInfo,
XrActionSet *actionSet)
{
struct oxr_action_set* act_set = NULL;
struct oxr_instance* inst = NULL;
struct oxr_action_set *act_set = NULL;
struct oxr_instance *inst = NULL;
struct oxr_logger log;
XrResult ret;
OXR_VERIFY_INSTANCE_AND_INIT_LOG(&log, instance, inst,
@ -173,7 +173,7 @@ oxr_xrCreateActionSet(XrInstance instance,
XrResult
oxr_xrDestroyActionSet(XrActionSet actionSet)
{
struct oxr_action_set* act_set;
struct oxr_action_set *act_set;
struct oxr_logger log;
OXR_VERIFY_ACTIONSET_AND_INIT_LOG(&log, actionSet, act_set,
"xrDestroyActionSet");
@ -190,11 +190,11 @@ oxr_xrDestroyActionSet(XrActionSet actionSet)
XrResult
oxr_xrCreateAction(XrActionSet actionSet,
const XrActionCreateInfo* createInfo,
XrAction* action)
const XrActionCreateInfo *createInfo,
XrAction *action)
{
struct oxr_action_set* act_set;
struct oxr_action* act = NULL;
struct oxr_action_set *act_set;
struct oxr_action *act = NULL;
struct oxr_logger log;
XrResult ret;
@ -207,7 +207,7 @@ oxr_xrCreateAction(XrActionSet actionSet,
OXR_VERIFY_ARG_LOCALIZED_NAME(&log, createInfo->localizedActionName);
OXR_VERIFY_ARG_NOT_NULL(&log, action);
struct oxr_instance* inst = act_set->inst;
struct oxr_instance *inst = act_set->inst;
ret = oxr_verify_subaction_paths_create(
&log, inst, createInfo->countSubactionPaths,
@ -229,7 +229,7 @@ oxr_xrCreateAction(XrActionSet actionSet,
XrResult
oxr_xrDestroyAction(XrAction action)
{
struct oxr_action* act;
struct oxr_action *act;
struct oxr_logger log;
OXR_VERIFY_ACTION_AND_INIT_LOG(&log, action, act, "xrDestroyAction");
@ -238,11 +238,11 @@ oxr_xrDestroyAction(XrAction action)
XrResult
oxr_xrGetActionStateBoolean(XrSession session,
const XrActionStateGetInfo* getInfo,
XrActionStateBoolean* data)
const XrActionStateGetInfo *getInfo,
XrActionStateBoolean *data)
{
struct oxr_session* sess = NULL;
struct oxr_action* act = NULL;
struct oxr_session *sess = NULL;
struct oxr_action *act = NULL;
struct oxr_sub_paths sub_paths = {0};
struct oxr_logger log;
XrResult ret;
@ -270,11 +270,11 @@ oxr_xrGetActionStateBoolean(XrSession session,
XrResult
oxr_xrGetActionStateFloat(XrSession session,
const XrActionStateGetInfo* getInfo,
XrActionStateFloat* data)
const XrActionStateGetInfo *getInfo,
XrActionStateFloat *data)
{
struct oxr_session* sess = NULL;
struct oxr_action* act = NULL;
struct oxr_session *sess = NULL;
struct oxr_action *act = NULL;
struct oxr_sub_paths sub_paths = {0};
struct oxr_logger log;
XrResult ret;
@ -302,11 +302,11 @@ oxr_xrGetActionStateFloat(XrSession session,
XrResult
oxr_xrGetActionStateVector2f(XrSession session,
const XrActionStateGetInfo* getInfo,
XrActionStateVector2f* data)
const XrActionStateGetInfo *getInfo,
XrActionStateVector2f *data)
{
struct oxr_session* sess = NULL;
struct oxr_action* act = NULL;
struct oxr_session *sess = NULL;
struct oxr_action *act = NULL;
struct oxr_sub_paths sub_paths = {0};
struct oxr_logger log;
XrResult ret;
@ -334,11 +334,11 @@ oxr_xrGetActionStateVector2f(XrSession session,
XrResult
oxr_xrGetActionStatePose(XrSession session,
const XrActionStateGetInfo* getInfo,
XrActionStatePose* data)
const XrActionStateGetInfo *getInfo,
XrActionStatePose *data)
{
struct oxr_session* sess = NULL;
struct oxr_action* act = NULL;
struct oxr_session *sess = NULL;
struct oxr_action *act = NULL;
struct oxr_sub_paths sub_paths = {0};
struct oxr_logger log;
XrResult ret;
@ -367,13 +367,13 @@ oxr_xrGetActionStatePose(XrSession session,
XrResult
oxr_xrEnumerateBoundSourcesForAction(
XrSession session,
const XrBoundSourcesForActionEnumerateInfo* enumerateInfo,
const XrBoundSourcesForActionEnumerateInfo *enumerateInfo,
uint32_t sourceCapacityInput,
uint32_t* sourceCountOutput,
XrPath* sources)
uint32_t *sourceCountOutput,
XrPath *sources)
{
struct oxr_session* sess = NULL;
struct oxr_action* act = NULL;
struct oxr_session *sess = NULL;
struct oxr_action *act = NULL;
struct oxr_logger log;
OXR_VERIFY_SESSION_AND_INIT_LOG(&log, session, sess,
"xrEnumerateBoundSourcesForAction");
@ -396,11 +396,11 @@ oxr_xrEnumerateBoundSourcesForAction(
XrResult
oxr_xrApplyHapticFeedback(XrSession session,
const XrHapticActionInfo* hapticActionInfo,
const XrHapticBaseHeader* hapticEvent)
const XrHapticActionInfo *hapticActionInfo,
const XrHapticBaseHeader *hapticEvent)
{
struct oxr_session* sess = NULL;
struct oxr_action* act = NULL;
struct oxr_session *sess = NULL;
struct oxr_action *act = NULL;
struct oxr_sub_paths sub_paths = {0};
struct oxr_logger log;
XrResult ret;
@ -430,10 +430,10 @@ oxr_xrApplyHapticFeedback(XrSession session,
XrResult
oxr_xrStopHapticFeedback(XrSession session,
const XrHapticActionInfo* hapticActionInfo)
const XrHapticActionInfo *hapticActionInfo)
{
struct oxr_session* sess = NULL;
struct oxr_action* act = NULL;
struct oxr_session *sess = NULL;
struct oxr_action *act = NULL;
struct oxr_sub_paths sub_paths = {0};
struct oxr_logger log;
XrResult ret;

View file

@ -17,9 +17,9 @@
XrResult
oxr_xrSetDebugUtilsObjectNameEXT(XrInstance instance,
const XrDebugUtilsObjectNameInfoEXT* nameInfo)
const XrDebugUtilsObjectNameInfoEXT *nameInfo)
{
struct oxr_instance* inst;
struct oxr_instance *inst;
struct oxr_logger log;
OXR_VERIFY_INSTANCE_AND_INIT_LOG(&log, instance, inst,
"xrSetDebugUtilsObjectNameEXT");
@ -30,11 +30,11 @@ oxr_xrSetDebugUtilsObjectNameEXT(XrInstance instance,
XrResult
oxr_xrCreateDebugUtilsMessengerEXT(
XrInstance instance,
const XrDebugUtilsMessengerCreateInfoEXT* createInfo,
XrDebugUtilsMessengerEXT* messenger)
const XrDebugUtilsMessengerCreateInfoEXT *createInfo,
XrDebugUtilsMessengerEXT *messenger)
{
struct oxr_instance* inst;
struct oxr_debug_messenger* mssngr;
struct oxr_instance *inst;
struct oxr_debug_messenger *mssngr;
struct oxr_logger log;
OXR_VERIFY_INSTANCE_AND_INIT_LOG(&log, instance, inst,
"xrCreateDebugUtilsMessengerEXT");
@ -57,7 +57,7 @@ oxr_xrCreateDebugUtilsMessengerEXT(
XrResult
oxr_xrDestroyDebugUtilsMessengerEXT(XrDebugUtilsMessengerEXT messenger)
{
struct oxr_debug_messenger* mssngr;
struct oxr_debug_messenger *mssngr;
struct oxr_logger log;
OXR_VERIFY_MESSENGER_AND_INIT_LOG(&log, messenger, mssngr,
"xrDestroyDebugUtilsMessengerEXT");
@ -71,9 +71,9 @@ oxr_xrSubmitDebugUtilsMessageEXT(
XrInstance instance,
XrDebugUtilsMessageSeverityFlagsEXT messageSeverity,
XrDebugUtilsMessageTypeFlagsEXT messageTypes,
const XrDebugUtilsMessengerCallbackDataEXT* callbackData)
const XrDebugUtilsMessengerCallbackDataEXT *callbackData)
{
struct oxr_instance* inst;
struct oxr_instance *inst;
struct oxr_logger log;
OXR_VERIFY_INSTANCE_AND_INIT_LOG(&log, instance, inst,
"xrSubmitDebugUtilsMessageEXT");
@ -85,9 +85,9 @@ oxr_xrSubmitDebugUtilsMessageEXT(
XrResult
oxr_xrSessionBeginDebugUtilsLabelRegionEXT(
XrSession session, const XrDebugUtilsLabelEXT* labelInfo)
XrSession session, const XrDebugUtilsLabelEXT *labelInfo)
{
struct oxr_session* sess;
struct oxr_session *sess;
struct oxr_logger log;
OXR_VERIFY_SESSION_AND_INIT_LOG(
&log, session, sess, "xrSessionBeginDebugUtilsLabelRegionEXT");
@ -99,7 +99,7 @@ oxr_xrSessionBeginDebugUtilsLabelRegionEXT(
XrResult
oxr_xrSessionEndDebugUtilsLabelRegionEXT(XrSession session)
{
struct oxr_session* sess;
struct oxr_session *sess;
struct oxr_logger log;
OXR_VERIFY_SESSION_AND_INIT_LOG(&log, session, sess,
"xrSessionEndDebugUtilsLabelRegionEXT");
@ -110,9 +110,9 @@ oxr_xrSessionEndDebugUtilsLabelRegionEXT(XrSession session)
XrResult
oxr_xrSessionInsertDebugUtilsLabelEXT(XrSession session,
const XrDebugUtilsLabelEXT* labelInfo)
const XrDebugUtilsLabelEXT *labelInfo)
{
struct oxr_session* sess;
struct oxr_session *sess;
struct oxr_logger log;
OXR_VERIFY_SESSION_AND_INIT_LOG(&log, session, sess,
"xrSessionInsertDebugUtilsLabelEXT");

View file

@ -36,14 +36,14 @@ extern "C" {
//! OpenXR API function @ep{xrGetInstanceProcAddr}
XrResult
oxr_xrGetInstanceProcAddr(XrInstance instance,
const char* name,
PFN_xrVoidFunction* function);
const char *name,
PFN_xrVoidFunction *function);
//! OpenXR API function @ep{xrEnumerateApiLayerProperties}
XrResult
oxr_xrEnumerateApiLayerProperties(uint32_t propertyCapacityInput,
uint32_t* propertyCountOutput,
XrApiLayerProperties* properties);
uint32_t *propertyCountOutput,
XrApiLayerProperties *properties);
/*
@ -54,15 +54,15 @@ oxr_xrEnumerateApiLayerProperties(uint32_t propertyCapacityInput,
//! OpenXR API function @ep{xrEnumerateInstanceExtensionProperties}
XrResult
oxr_xrEnumerateInstanceExtensionProperties(const char* layerName,
oxr_xrEnumerateInstanceExtensionProperties(const char *layerName,
uint32_t propertyCapacityInput,
uint32_t* propertyCountOutput,
XrExtensionProperties* properties);
uint32_t *propertyCountOutput,
XrExtensionProperties *properties);
//! OpenXR API function @ep{xrCreateInstance}
XrResult
oxr_xrCreateInstance(const XrInstanceCreateInfo* createInfo,
XrInstance* instance);
oxr_xrCreateInstance(const XrInstanceCreateInfo *createInfo,
XrInstance *instance);
//! OpenXR API function @ep{xrDestroyInstance}
XrResult
@ -71,11 +71,11 @@ oxr_xrDestroyInstance(XrInstance instance);
//! OpenXR API function @ep{xrGetInstanceProperties}
XrResult
oxr_xrGetInstanceProperties(XrInstance instance,
XrInstanceProperties* instanceProperties);
XrInstanceProperties *instanceProperties);
//! OpenXR API function @ep{xrPollEvent}
XrResult
oxr_xrPollEvent(XrInstance instance, XrEventDataBuffer* eventData);
oxr_xrPollEvent(XrInstance instance, XrEventDataBuffer *eventData);
//! OpenXR API function @ep{xrResultToString}
XrResult
@ -91,27 +91,27 @@ oxr_xrStructureTypeToString(XrInstance instance,
//! OpenXR API function @ep{xrStringToPath}
XrResult
oxr_xrStringToPath(XrInstance instance, const char* pathString, XrPath* path);
oxr_xrStringToPath(XrInstance instance, const char *pathString, XrPath *path);
//! OpenXR API function @ep{xrPathToString}
XrResult
oxr_xrPathToString(XrInstance instance,
XrPath path,
uint32_t bufferCapacityInput,
uint32_t* bufferCountOutput,
char* buffer);
uint32_t *bufferCountOutput,
char *buffer);
//! OpenXR API function @ep{xrConvertTimespecTimeToTimeKHR}
XrResult
oxr_xrConvertTimespecTimeToTimeKHR(XrInstance instance,
const struct timespec* timespecTime,
XrTime* time);
const struct timespec *timespecTime,
XrTime *time);
//! OpenXR API function @ep{xrConvertTimeToTimespecTimeKHR}
XrResult
oxr_xrConvertTimeToTimespecTimeKHR(XrInstance instance,
XrTime time,
struct timespec* timespecTime);
struct timespec *timespecTime);
/*
*
@ -122,14 +122,14 @@ oxr_xrConvertTimeToTimespecTimeKHR(XrInstance instance,
//! OpenXR API function @ep{xrGetSystem}
XrResult
oxr_xrGetSystem(XrInstance instance,
const XrSystemGetInfo* getInfo,
XrSystemId* systemId);
const XrSystemGetInfo *getInfo,
XrSystemId *systemId);
//! OpenXR API function @ep{xrGetSystemProperties}
XrResult
oxr_xrGetSystemProperties(XrInstance instance,
XrSystemId systemId,
XrSystemProperties* properties);
XrSystemProperties *properties);
//! OpenXR API function @ep{xrEnumerateViewConfigurations}
XrResult
@ -137,8 +137,8 @@ oxr_xrEnumerateViewConfigurations(
XrInstance instance,
XrSystemId systemId,
uint32_t viewConfigurationTypeCapacityInput,
uint32_t* viewConfigurationTypeCountOutput,
XrViewConfigurationType* viewConfigurationTypes);
uint32_t *viewConfigurationTypeCountOutput,
XrViewConfigurationType *viewConfigurationTypes);
//! OpenXR API function @ep{xrGetViewConfigurationProperties}
XrResult
@ -146,7 +146,7 @@ oxr_xrGetViewConfigurationProperties(
XrInstance instance,
XrSystemId systemId,
XrViewConfigurationType viewConfigurationType,
XrViewConfigurationProperties* configurationProperties);
XrViewConfigurationProperties *configurationProperties);
//! OpenXR API function @ep{xrEnumerateViewConfigurationViews}
XrResult
@ -155,8 +155,8 @@ oxr_xrEnumerateViewConfigurationViews(
XrSystemId systemId,
XrViewConfigurationType viewConfigurationType,
uint32_t viewCapacityInput,
uint32_t* viewCountOutput,
XrViewConfigurationView* views);
uint32_t *viewCountOutput,
XrViewConfigurationView *views);
//! OpenXR API function @ep{xrEnumerateEnvironmentBlendModes}
XrResult
@ -165,8 +165,8 @@ oxr_xrEnumerateEnvironmentBlendModes(
XrSystemId systemId,
XrViewConfigurationType viewConfigurationType,
uint32_t environmentBlendModeCapacityInput,
uint32_t* environmentBlendModeCountOutput,
XrEnvironmentBlendMode* environmentBlendModes);
uint32_t *environmentBlendModeCountOutput,
XrEnvironmentBlendMode *environmentBlendModes);
#ifdef XR_USE_GRAPHICS_API_OPENGL
//! OpenXR API function @ep{xrGetOpenGLGraphicsRequirementsKHR}
@ -174,7 +174,7 @@ XrResult
oxr_xrGetOpenGLGraphicsRequirementsKHR(
XrInstance instance,
XrSystemId systemId,
XrGraphicsRequirementsOpenGLKHR* graphicsRequirements);
XrGraphicsRequirementsOpenGLKHR *graphicsRequirements);
#endif
#ifdef XR_USE_GRAPHICS_API_VULKAN
@ -183,30 +183,30 @@ XrResult
oxr_xrGetVulkanInstanceExtensionsKHR(XrInstance instance,
XrSystemId systemId,
uint32_t namesCapacityInput,
uint32_t* namesCountOutput,
char* namesString);
uint32_t *namesCountOutput,
char *namesString);
//! OpenXR API function @ep{xrGetVulkanDeviceExtensionsKHR}
XrResult
oxr_xrGetVulkanDeviceExtensionsKHR(XrInstance instance,
XrSystemId systemId,
uint32_t namesCapacityInput,
uint32_t* namesCountOutput,
char* namesString);
uint32_t *namesCountOutput,
char *namesString);
//! OpenXR API function @ep{xrGetVulkanGraphicsDeviceKHR}
XrResult
oxr_xrGetVulkanGraphicsDeviceKHR(XrInstance instance,
XrSystemId systemId,
VkInstance vkInstance,
VkPhysicalDevice* vkPhysicalDevice);
VkPhysicalDevice *vkPhysicalDevice);
//! OpenXR API function @ep{xrGetVulkanGraphicsRequirementsKHR}
XrResult
oxr_xrGetVulkanGraphicsRequirementsKHR(
XrInstance instance,
XrSystemId systemId,
XrGraphicsRequirementsVulkanKHR* graphicsRequirements);
XrGraphicsRequirementsVulkanKHR *graphicsRequirements);
#endif
@ -219,8 +219,8 @@ oxr_xrGetVulkanGraphicsRequirementsKHR(
//! OpenXR API function @ep{xrCreateSession}
XrResult
oxr_xrCreateSession(XrInstance instance,
const XrSessionCreateInfo* createInfo,
XrSession* session);
const XrSessionCreateInfo *createInfo,
XrSession *session);
//! OpenXR API function @ep{xrDestroySession}
XrResult
@ -228,7 +228,7 @@ oxr_xrDestroySession(XrSession session);
//! OpenXR API function @ep{xrBeginSession}
XrResult
oxr_xrBeginSession(XrSession session, const XrSessionBeginInfo* beginInfo);
oxr_xrBeginSession(XrSession session, const XrSessionBeginInfo *beginInfo);
//! OpenXR API function @ep{xrEndSession}
XrResult
@ -237,16 +237,16 @@ oxr_xrEndSession(XrSession session);
//! OpenXR API function @ep{xrWaitFrame}
XrResult
oxr_xrWaitFrame(XrSession session,
const XrFrameWaitInfo* frameWaitInfo,
XrFrameState* frameState);
const XrFrameWaitInfo *frameWaitInfo,
XrFrameState *frameState);
//! OpenXR API function @ep{xrBeginFrame}
XrResult
oxr_xrBeginFrame(XrSession session, const XrFrameBeginInfo* frameBeginInfo);
oxr_xrBeginFrame(XrSession session, const XrFrameBeginInfo *frameBeginInfo);
//! OpenXR API function @ep{xrEndFrame}
XrResult
oxr_xrEndFrame(XrSession session, const XrFrameEndInfo* frameEndInfo);
oxr_xrEndFrame(XrSession session, const XrFrameEndInfo *frameEndInfo);
//! OpenXR API function @ep{xrRequestExitSession}
XrResult
@ -255,11 +255,11 @@ oxr_xrRequestExitSession(XrSession session);
//! OpenXR API function @ep{xrLocateViews}
XrResult
oxr_xrLocateViews(XrSession session,
const XrViewLocateInfo* viewLocateInfo,
XrViewState* viewState,
const XrViewLocateInfo *viewLocateInfo,
XrViewState *viewState,
uint32_t viewCapacityInput,
uint32_t* viewCountOutput,
XrView* views);
uint32_t *viewCountOutput,
XrView *views);
#ifdef OXR_HAVE_KHR_visibility_mask
//! OpenXR API function @ep{xrGetVisibilityMaskKHR}
@ -268,7 +268,7 @@ oxr_xrGetVisibilityMaskKHR(XrSession session,
XrViewConfigurationType viewConfigurationType,
uint32_t viewIndex,
XrVisibilityMaskTypeKHR visibilityMaskType,
XrVisibilityMaskKHR* visibilityMask);
XrVisibilityMaskKHR *visibilityMask);
#endif // OXR_HAVE_KHR_visibility_mask
#ifdef OXR_HAVE_EXT_performance_settings
@ -285,9 +285,9 @@ XrResult
oxr_xrThermalGetTemperatureTrendEXT(
XrSession session,
XrPerfSettingsDomainEXT domain,
XrPerfSettingsNotificationLevelEXT* notificationLevel,
float* tempHeadroom,
float* tempSlope);
XrPerfSettingsNotificationLevelEXT *notificationLevel,
float *tempHeadroom,
float *tempSlope);
#endif // OXR_HAVE_EXT_thermal_query
@ -301,27 +301,27 @@ oxr_xrThermalGetTemperatureTrendEXT(
XrResult
oxr_xrEnumerateReferenceSpaces(XrSession session,
uint32_t spaceCapacityInput,
uint32_t* spaceCountOutput,
XrReferenceSpaceType* spaces);
uint32_t *spaceCountOutput,
XrReferenceSpaceType *spaces);
//! OpenXR API function @ep{xrGetReferenceSpaceBoundsRect}
XrResult
oxr_xrGetReferenceSpaceBoundsRect(XrSession session,
XrReferenceSpaceType referenceSpaceType,
XrExtent2Df* bounds);
XrExtent2Df *bounds);
//! OpenXR API function @ep{xrCreateReferenceSpace}
XrResult
oxr_xrCreateReferenceSpace(XrSession session,
const XrReferenceSpaceCreateInfo* createInfo,
XrSpace* space);
const XrReferenceSpaceCreateInfo *createInfo,
XrSpace *space);
//! OpenXR API function @ep{xrLocateSpace}
XrResult
oxr_xrLocateSpace(XrSpace space,
XrSpace baseSpace,
XrTime time,
XrSpaceLocation* location);
XrSpaceLocation *location);
//! OpenXR API function @ep{xrDestroySpace}
XrResult
@ -338,14 +338,14 @@ oxr_xrDestroySpace(XrSpace space);
XrResult
oxr_xrEnumerateSwapchainFormats(XrSession session,
uint32_t formatCapacityInput,
uint32_t* formatCountOutput,
int64_t* formats);
uint32_t *formatCountOutput,
int64_t *formats);
//! OpenXR API function @ep{xrCreateSwapchain}
XrResult
oxr_xrCreateSwapchain(XrSession session,
const XrSwapchainCreateInfo* createInfo,
XrSwapchain* swapchain);
const XrSwapchainCreateInfo *createInfo,
XrSwapchain *swapchain);
//! OpenXR API function @ep{xrDestroySwapchain}
XrResult
@ -355,24 +355,24 @@ oxr_xrDestroySwapchain(XrSwapchain swapchain);
XrResult
oxr_xrEnumerateSwapchainImages(XrSwapchain swapchain,
uint32_t imageCapacityInput,
uint32_t* imageCountOutput,
XrSwapchainImageBaseHeader* images);
uint32_t *imageCountOutput,
XrSwapchainImageBaseHeader *images);
//! OpenXR API function @ep{xrAcquireSwapchainImage}
XrResult
oxr_xrAcquireSwapchainImage(XrSwapchain swapchain,
const XrSwapchainImageAcquireInfo* acquireInfo,
uint32_t* index);
const XrSwapchainImageAcquireInfo *acquireInfo,
uint32_t *index);
//! OpenXR API function @ep{xrWaitSwapchainImage}
XrResult
oxr_xrWaitSwapchainImage(XrSwapchain swapchain,
const XrSwapchainImageWaitInfo* waitInfo);
const XrSwapchainImageWaitInfo *waitInfo);
//! OpenXR API function @ep{xrReleaseSwapchainImage}
XrResult
oxr_xrReleaseSwapchainImage(XrSwapchain swapchain,
const XrSwapchainImageReleaseInfo* releaseInfo);
const XrSwapchainImageReleaseInfo *releaseInfo);
/*
@ -384,14 +384,14 @@ oxr_xrReleaseSwapchainImage(XrSwapchain swapchain,
//! OpenXR API function @ep{xrSetDebugUtilsObjectNameEXT}
XrResult
oxr_xrSetDebugUtilsObjectNameEXT(XrInstance instance,
const XrDebugUtilsObjectNameInfoEXT* nameInfo);
const XrDebugUtilsObjectNameInfoEXT *nameInfo);
//! OpenXR API function @ep{xrCreateDebugUtilsMessengerEXT}
XrResult
oxr_xrCreateDebugUtilsMessengerEXT(
XrInstance instance,
const XrDebugUtilsMessengerCreateInfoEXT* createInfo,
XrDebugUtilsMessengerEXT* messenger);
const XrDebugUtilsMessengerCreateInfoEXT *createInfo,
XrDebugUtilsMessengerEXT *messenger);
//! OpenXR API function @ep{xrDestroyDebugUtilsMessengerEXT}
XrResult
@ -403,12 +403,12 @@ oxr_xrSubmitDebugUtilsMessageEXT(
XrInstance instance,
XrDebugUtilsMessageSeverityFlagsEXT messageSeverity,
XrDebugUtilsMessageTypeFlagsEXT messageTypes,
const XrDebugUtilsMessengerCallbackDataEXT* callbackData);
const XrDebugUtilsMessengerCallbackDataEXT *callbackData);
//! OpenXR API function @ep{xrSessionBeginDebugUtilsLabelRegionEXT}
XrResult
oxr_xrSessionBeginDebugUtilsLabelRegionEXT(
XrSession session, const XrDebugUtilsLabelEXT* labelInfo);
XrSession session, const XrDebugUtilsLabelEXT *labelInfo);
//! OpenXR API function @ep{xrSessionEndDebugUtilsLabelRegionEXT}
XrResult
@ -417,7 +417,7 @@ oxr_xrSessionEndDebugUtilsLabelRegionEXT(XrSession session);
//! OpenXR API function @ep{xrSessionInsertDebugUtilsLabelEXT}
XrResult
oxr_xrSessionInsertDebugUtilsLabelEXT(XrSession session,
const XrDebugUtilsLabelEXT* labelInfo);
const XrDebugUtilsLabelEXT *labelInfo);
/*
@ -429,14 +429,14 @@ oxr_xrSessionInsertDebugUtilsLabelEXT(XrSession session,
//! OpenXR API function @ep{xrCreateActionSpace}
XrResult
oxr_xrCreateActionSpace(XrSession session,
const XrActionSpaceCreateInfo* createInfo,
XrSpace* space);
const XrActionSpaceCreateInfo *createInfo,
XrSpace *space);
//! OpenXR API function @ep{xrCreateActionSet}
XrResult
oxr_xrCreateActionSet(XrInstance instance,
const XrActionSetCreateInfo* createInfo,
XrActionSet* actionSet);
const XrActionSetCreateInfo *createInfo,
XrActionSet *actionSet);
//! OpenXR API function @ep{xrDestroyActionSet}
XrResult
@ -445,8 +445,8 @@ oxr_xrDestroyActionSet(XrActionSet actionSet);
//! OpenXR API function @ep{xrCreateAction}
XrResult
oxr_xrCreateAction(XrActionSet actionSet,
const XrActionCreateInfo* createInfo,
XrAction* action);
const XrActionCreateInfo *createInfo,
XrAction *action);
//! OpenXR API function @ep{xrDestroyAction}
XrResult
@ -456,76 +456,76 @@ oxr_xrDestroyAction(XrAction action);
XrResult
oxr_xrSuggestInteractionProfileBindings(
XrInstance instance,
const XrInteractionProfileSuggestedBinding* suggestedBindings);
const XrInteractionProfileSuggestedBinding *suggestedBindings);
//! OpenXR API function @ep{xrAttachSessionActionSets}
XrResult
oxr_xrAttachSessionActionSets(XrSession session,
const XrSessionActionSetsAttachInfo* bindInfo);
const XrSessionActionSetsAttachInfo *bindInfo);
//! OpenXR API function @ep{xrGetCurrentInteractionProfile}
XrResult
oxr_xrGetCurrentInteractionProfile(
XrSession session,
XrPath topLevelUserPath,
XrInteractionProfileState* interactionProfile);
XrInteractionProfileState *interactionProfile);
//! OpenXR API function @ep{xrGetActionStateBoolean}
XrResult
oxr_xrGetActionStateBoolean(XrSession session,
const XrActionStateGetInfo* getInfo,
XrActionStateBoolean* data);
const XrActionStateGetInfo *getInfo,
XrActionStateBoolean *data);
//! OpenXR API function @ep{xrGetActionStateFloat}
XrResult
oxr_xrGetActionStateFloat(XrSession session,
const XrActionStateGetInfo* getInfo,
XrActionStateFloat* data);
const XrActionStateGetInfo *getInfo,
XrActionStateFloat *data);
//! OpenXR API function @ep{xrGetActionStateVector2f}
XrResult
oxr_xrGetActionStateVector2f(XrSession session,
const XrActionStateGetInfo* getInfo,
XrActionStateVector2f* data);
const XrActionStateGetInfo *getInfo,
XrActionStateVector2f *data);
//! OpenXR API function @ep{xrGetActionStatePose}
XrResult
oxr_xrGetActionStatePose(XrSession session,
const XrActionStateGetInfo* getInfo,
XrActionStatePose* data);
const XrActionStateGetInfo *getInfo,
XrActionStatePose *data);
//! OpenXR API function @ep{xrSyncActions}
XrResult
oxr_xrSyncActions(XrSession session, const XrActionsSyncInfo* syncInfo);
oxr_xrSyncActions(XrSession session, const XrActionsSyncInfo *syncInfo);
//! OpenXR API function @ep{xrEnumerateBoundSourcesForAction}
XrResult
oxr_xrEnumerateBoundSourcesForAction(
XrSession session,
const XrBoundSourcesForActionEnumerateInfo* enumerateInfo,
const XrBoundSourcesForActionEnumerateInfo *enumerateInfo,
uint32_t sourceCapacityInput,
uint32_t* sourceCountOutput,
XrPath* sources);
uint32_t *sourceCountOutput,
XrPath *sources);
//! OpenXR API function @ep{xrGetInputSourceLocalizedName}
XrResult
oxr_xrGetInputSourceLocalizedName(
XrSession session,
const XrInputSourceLocalizedNameGetInfo* getInfo,
const XrInputSourceLocalizedNameGetInfo *getInfo,
uint32_t bufferCapacityInput,
uint32_t* bufferCountOutput,
char* buffer);
uint32_t *bufferCountOutput,
char *buffer);
//! OpenXR API function @ep{xrApplyHapticFeedback}
XrResult
oxr_xrApplyHapticFeedback(XrSession session,
const XrHapticActionInfo* hapticActionInfo,
const XrHapticBaseHeader* hapticEvent);
const XrHapticActionInfo *hapticActionInfo,
const XrHapticBaseHeader *hapticEvent);
//! OpenXR API function @ep{xrStopHapticFeedback}
XrResult
oxr_xrStopHapticFeedback(XrSession session,
const XrHapticActionInfo* hapticActionInfo);
const XrHapticActionInfo *hapticActionInfo);
/*!

View file

@ -35,10 +35,10 @@ static const XrExtensionProperties extension_properties[] = {
OXR_EXTENSION_SUPPORT_GENERATE(MAKE_EXTENSION_PROPERTIES)};
XrResult
oxr_xrEnumerateInstanceExtensionProperties(const char* layerName,
oxr_xrEnumerateInstanceExtensionProperties(const char *layerName,
uint32_t propertyCapacityInput,
uint32_t* propertyCountOutput,
XrExtensionProperties* properties)
uint32_t *propertyCountOutput,
XrExtensionProperties *properties)
{
struct oxr_logger log;
oxr_log_init(&log, "xrEnumerateInstanceExtensionProperties");
@ -49,8 +49,8 @@ oxr_xrEnumerateInstanceExtensionProperties(const char* layerName,
}
XrResult
oxr_xrCreateInstance(const XrInstanceCreateInfo* createInfo,
XrInstance* out_instance)
oxr_xrCreateInstance(const XrInstanceCreateInfo *createInfo,
XrInstance *out_instance)
{
XrResult ret;
struct oxr_logger log;
@ -102,7 +102,7 @@ oxr_xrCreateInstance(const XrInstanceCreateInfo* createInfo,
i);
}
struct oxr_instance* inst;
struct oxr_instance *inst;
ret = oxr_instance_create(&log, createInfo, &inst);
if (ret != XR_SUCCESS) {
@ -117,7 +117,7 @@ oxr_xrCreateInstance(const XrInstanceCreateInfo* createInfo,
XrResult
oxr_xrDestroyInstance(XrInstance instance)
{
struct oxr_instance* inst;
struct oxr_instance *inst;
struct oxr_logger log;
OXR_VERIFY_INSTANCE_AND_INIT_LOG(&log, instance, inst,
"xrDestroyInstance");
@ -127,9 +127,9 @@ oxr_xrDestroyInstance(XrInstance instance)
XrResult
oxr_xrGetInstanceProperties(XrInstance instance,
XrInstanceProperties* instanceProperties)
XrInstanceProperties *instanceProperties)
{
struct oxr_instance* inst;
struct oxr_instance *inst;
struct oxr_logger log;
OXR_VERIFY_INSTANCE_AND_INIT_LOG(&log, instance, inst,
"xrGetInstanceProperties");
@ -138,9 +138,9 @@ oxr_xrGetInstanceProperties(XrInstance instance,
}
XrResult
oxr_xrPollEvent(XrInstance instance, XrEventDataBuffer* eventData)
oxr_xrPollEvent(XrInstance instance, XrEventDataBuffer *eventData)
{
struct oxr_instance* inst;
struct oxr_instance *inst;
struct oxr_logger log;
OXR_VERIFY_INSTANCE_AND_INIT_LOG(&log, instance, inst, "xrPollEvent");
OXR_VERIFY_ARG_NOT_NULL(&log, eventData);
@ -153,7 +153,7 @@ oxr_xrResultToString(XrInstance instance,
XrResult value,
char buffer[XR_MAX_RESULT_STRING_SIZE])
{
struct oxr_instance* inst;
struct oxr_instance *inst;
struct oxr_logger log;
OXR_VERIFY_INSTANCE_AND_INIT_LOG(&log, instance, inst,
"xrResultToString");
@ -176,7 +176,7 @@ oxr_xrStructureTypeToString(XrInstance instance,
XrStructureType value,
char buffer[XR_MAX_STRUCTURE_NAME_SIZE])
{
struct oxr_instance* inst;
struct oxr_instance *inst;
struct oxr_logger log;
OXR_VERIFY_INSTANCE_AND_INIT_LOG(&log, instance, inst,
"xrStructureTypeToString");
@ -196,10 +196,10 @@ oxr_xrStructureTypeToString(XrInstance instance,
XrResult
oxr_xrStringToPath(XrInstance instance,
const char* pathString,
XrPath* out_path)
const char *pathString,
XrPath *out_path)
{
struct oxr_instance* inst;
struct oxr_instance *inst;
struct oxr_logger log;
XrResult ret;
XrPath path;
@ -226,12 +226,12 @@ XrResult
oxr_xrPathToString(XrInstance instance,
XrPath path,
uint32_t bufferCapacityInput,
uint32_t* bufferCountOutput,
char* buffer)
uint32_t *bufferCountOutput,
char *buffer)
{
struct oxr_instance* inst;
struct oxr_instance *inst;
struct oxr_logger log;
const char* str;
const char *str;
size_t length;
XrResult ret;
@ -260,12 +260,12 @@ oxr_xrPathToString(XrInstance instance,
#ifdef XR_USE_TIMESPEC
XrResult
oxr_xrConvertTimespecTimeToTimeKHR(XrInstance instance,
const struct timespec* timespecTime,
XrTime* time)
const struct timespec *timespecTime,
XrTime *time)
{
//! @todo do we need to check and see if this extension was
//! enabled first?
struct oxr_instance* inst;
struct oxr_instance *inst;
struct oxr_logger log;
OXR_VERIFY_INSTANCE_AND_INIT_LOG(&log, instance, inst,
"xrConvertTimespecTimeToTimeKHR");
@ -280,9 +280,9 @@ oxr_xrConvertTimespecTimeToTimeKHR(XrInstance instance,
XrResult
oxr_xrConvertTimeToTimespecTimeKHR(XrInstance instance,
XrTime time,
struct timespec* timespecTime)
struct timespec *timespecTime)
{
struct oxr_instance* inst;
struct oxr_instance *inst;
struct oxr_logger log;
OXR_VERIFY_INSTANCE_AND_INIT_LOG(&log, instance, inst,
"xrConvertTimeToTimespecTimeKHR");

View file

@ -34,8 +34,8 @@ DEBUG_GET_ONCE_BOOL_OPTION(negotiate, "OXR_DEBUG_NEGOTIATE", false)
XrResult
xrNegotiateLoaderRuntimeInterface(const XrNegotiateLoaderInfo* loaderInfo,
XrNegotiateRuntimeRequest* runtimeRequest)
xrNegotiateLoaderRuntimeInterface(const XrNegotiateLoaderInfo *loaderInfo,
XrNegotiateRuntimeRequest *runtimeRequest)
{
PRINT_NEGOTIATE("xrNegotiateLoaderRuntimeInterface\n");
@ -84,8 +84,8 @@ xrNegotiateLoaderRuntimeInterface(const XrNegotiateLoaderInfo* loaderInfo,
XrResult
oxr_xrEnumerateApiLayerProperties(uint32_t propertyCapacityInput,
uint32_t* propertyCountOutput,
XrApiLayerProperties* properties)
uint32_t *propertyCountOutput,
XrApiLayerProperties *properties)
{
struct oxr_logger log;
oxr_log_init(&log, "xrEnumerateApiLayerProperties");
@ -146,10 +146,10 @@ oxr_xrEnumerateApiLayerProperties(uint32_t propertyCapacityInput,
* Handle a non-null instance pointer.
*/
static XrResult
handle_non_null(struct oxr_instance* inst,
struct oxr_logger* log,
const char* name,
PFN_xrVoidFunction* out_function)
handle_non_null(struct oxr_instance *inst,
struct oxr_logger *log,
const char *name,
PFN_xrVoidFunction *out_function)
{
ENTRY(xrGetInstanceProcAddr);
ENTRY(xrEnumerateInstanceExtensionProperties);
@ -259,9 +259,9 @@ handle_non_null(struct oxr_instance* inst,
* Special case a null instance pointer.
*/
static XrResult
handle_null(struct oxr_logger* log,
const char* name,
PFN_xrVoidFunction* out_function)
handle_null(struct oxr_logger *log,
const char *name,
PFN_xrVoidFunction *out_function)
{
ENTRY(xrCreateInstance);
ENTRY(xrEnumerateInstanceExtensionProperties);
@ -277,8 +277,8 @@ handle_null(struct oxr_logger* log,
XrResult
oxr_xrGetInstanceProcAddr(XrInstance instance,
const char* name,
PFN_xrVoidFunction* function)
const char *name,
PFN_xrVoidFunction *function)
{
struct oxr_logger log;
@ -290,7 +290,7 @@ oxr_xrGetInstanceProcAddr(XrInstance instance,
return handle_null(&log, name, function);
}
struct oxr_instance* inst;
struct oxr_instance *inst;
OXR_VERIFY_INSTANCE_AND_INIT_LOG(&log, instance, inst,
"xrGetInstanceProcAddr");
return handle_non_null(inst, &log, name, function);

View file

@ -26,12 +26,12 @@
XrResult
oxr_xrCreateSession(XrInstance instance,
const XrSessionCreateInfo* createInfo,
XrSession* out_session)
const XrSessionCreateInfo *createInfo,
XrSession *out_session)
{
XrResult ret;
struct oxr_instance* inst;
struct oxr_session* sess;
struct oxr_instance *inst;
struct oxr_session *sess;
struct oxr_logger log;
OXR_VERIFY_INSTANCE_AND_INIT_LOG(&log, instance, inst,
"xrCreateSession");
@ -54,7 +54,7 @@ oxr_xrCreateSession(XrInstance instance,
XrResult
oxr_xrDestroySession(XrSession session)
{
struct oxr_session* sess;
struct oxr_session *sess;
struct oxr_logger log;
OXR_VERIFY_SESSION_AND_INIT_LOG(&log, session, sess,
"xrDestroySession");
@ -63,9 +63,9 @@ oxr_xrDestroySession(XrSession session)
}
XrResult
oxr_xrBeginSession(XrSession session, const XrSessionBeginInfo* beginInfo)
oxr_xrBeginSession(XrSession session, const XrSessionBeginInfo *beginInfo)
{
struct oxr_session* sess;
struct oxr_session *sess;
struct oxr_logger log;
OXR_VERIFY_SESSION_AND_INIT_LOG(&log, session, sess, "xrBeginSession");
OXR_VERIFY_ARG_TYPE_AND_NULL(&log, beginInfo,
@ -77,7 +77,7 @@ oxr_xrBeginSession(XrSession session, const XrSessionBeginInfo* beginInfo)
XrResult
oxr_xrEndSession(XrSession session)
{
struct oxr_session* sess;
struct oxr_session *sess;
struct oxr_logger log;
OXR_VERIFY_SESSION_AND_INIT_LOG(&log, session, sess, "xrEndSession");
@ -86,10 +86,10 @@ oxr_xrEndSession(XrSession session)
XrResult
oxr_xrWaitFrame(XrSession session,
const XrFrameWaitInfo* frameWaitInfo,
XrFrameState* frameState)
const XrFrameWaitInfo *frameWaitInfo,
XrFrameState *frameState)
{
struct oxr_session* sess;
struct oxr_session *sess;
struct oxr_logger log;
OXR_VERIFY_SESSION_AND_INIT_LOG(&log, session, sess, "xrWaitFrame");
if (sess->compositor == NULL) {
@ -103,9 +103,9 @@ oxr_xrWaitFrame(XrSession session,
}
XrResult
oxr_xrBeginFrame(XrSession session, const XrFrameBeginInfo* frameBeginInfo)
oxr_xrBeginFrame(XrSession session, const XrFrameBeginInfo *frameBeginInfo)
{
struct oxr_session* sess;
struct oxr_session *sess;
struct oxr_logger log;
OXR_VERIFY_SESSION_AND_INIT_LOG(&log, session, sess, "xrBeginFrame");
// NULL explicitly allowed here because it's a basically empty struct.
@ -118,9 +118,9 @@ oxr_xrBeginFrame(XrSession session, const XrFrameBeginInfo* frameBeginInfo)
}
XrResult
oxr_xrEndFrame(XrSession session, const XrFrameEndInfo* frameEndInfo)
oxr_xrEndFrame(XrSession session, const XrFrameEndInfo *frameEndInfo)
{
struct oxr_session* sess;
struct oxr_session *sess;
struct oxr_logger log;
OXR_VERIFY_SESSION_AND_INIT_LOG(&log, session, sess, "xrEndFrame");
OXR_VERIFY_ARG_TYPE_AND_NULL(&log, frameEndInfo,
@ -132,7 +132,7 @@ oxr_xrEndFrame(XrSession session, const XrFrameEndInfo* frameEndInfo)
XrResult
oxr_xrRequestExitSession(XrSession session)
{
struct oxr_session* sess;
struct oxr_session *sess;
struct oxr_logger log;
OXR_VERIFY_SESSION_AND_INIT_LOG(&log, session, sess,
"xrRequestExitSession");
@ -142,14 +142,14 @@ oxr_xrRequestExitSession(XrSession session)
XrResult
oxr_xrLocateViews(XrSession session,
const XrViewLocateInfo* viewLocateInfo,
XrViewState* viewState,
const XrViewLocateInfo *viewLocateInfo,
XrViewState *viewState,
uint32_t viewCapacityInput,
uint32_t* viewCountOutput,
XrView* views)
uint32_t *viewCountOutput,
XrView *views)
{
struct oxr_session* sess;
struct oxr_space* spc;
struct oxr_session *sess;
struct oxr_space *spc;
struct oxr_logger log;
OXR_VERIFY_SESSION_AND_INIT_LOG(&log, session, sess, "xrLocateViews");
OXR_VERIFY_ARG_TYPE_AND_NULL(&log, viewLocateInfo,
@ -181,9 +181,9 @@ oxr_xrGetVisibilityMaskKHR(XrSession session,
XrViewConfigurationType viewConfigurationType,
uint32_t viewIndex,
XrVisibilityMaskTypeKHR visibilityMaskType,
XrVisibilityMaskKHR* visibilityMask)
XrVisibilityMaskKHR *visibilityMask)
{
struct oxr_session* sess;
struct oxr_session *sess;
struct oxr_logger log;
OXR_VERIFY_SESSION_AND_INIT_LOG(&log, session, sess,
"xrGetVisibilityMaskKHR");
@ -207,7 +207,7 @@ oxr_xrPerfSettingsSetPerformanceLevelEXT(XrSession session,
XrPerfSettingsDomainEXT domain,
XrPerfSettingsLevelEXT level)
{
struct oxr_session* sess;
struct oxr_session *sess;
struct oxr_logger log;
OXR_VERIFY_SESSION_AND_INIT_LOG(&log, session, sess,
"xrPerfSettingsSetPerformanceLevelEXT");
@ -230,11 +230,11 @@ XrResult
oxr_xrThermalGetTemperatureTrendEXT(
XrSession session,
XrPerfSettingsDomainEXT domain,
XrPerfSettingsNotificationLevelEXT* notificationLevel,
float* tempHeadroom,
float* tempSlope)
XrPerfSettingsNotificationLevelEXT *notificationLevel,
float *tempHeadroom,
float *tempSlope)
{
struct oxr_session* sess;
struct oxr_session *sess;
struct oxr_logger log;
OXR_VERIFY_SESSION_AND_INIT_LOG(&log, session, sess,
"xrThermalGetTemperatureTrendEXT");

View file

@ -26,11 +26,11 @@
XrResult
oxr_xrCreateActionSpace(XrSession session,
const XrActionSpaceCreateInfo* createInfo,
XrSpace* space)
const XrActionSpaceCreateInfo *createInfo,
XrSpace *space)
{
struct oxr_session* sess;
struct oxr_action* act;
struct oxr_session *sess;
struct oxr_action *act;
struct oxr_logger log;
OXR_VERIFY_SESSION_AND_INIT_LOG(&log, session, sess,
"xrCreateActionSpace");
@ -39,7 +39,7 @@ oxr_xrCreateActionSpace(XrSession session,
OXR_VERIFY_POSE(&log, createInfo->poseInActionSpace);
OXR_VERIFY_ACTION_NOT_NULL(&log, createInfo->action, act);
struct oxr_space* spc;
struct oxr_space *spc;
XrResult ret =
oxr_space_action_create(&log, sess, act->key, createInfo, &spc);
if (ret != XR_SUCCESS) {
@ -60,10 +60,10 @@ static const XrReferenceSpaceType session_spaces[] = {
XrResult
oxr_xrEnumerateReferenceSpaces(XrSession session,
uint32_t spaceCapacityInput,
uint32_t* spaceCountOutput,
XrReferenceSpaceType* spaces)
uint32_t *spaceCountOutput,
XrReferenceSpaceType *spaces)
{
struct oxr_session* sess;
struct oxr_session *sess;
struct oxr_logger log;
OXR_VERIFY_SESSION_AND_INIT_LOG(&log, session, sess,
"xrEnumerateReferenceSpaces");
@ -75,9 +75,9 @@ oxr_xrEnumerateReferenceSpaces(XrSession session,
XrResult
oxr_xrGetReferenceSpaceBoundsRect(XrSession session,
XrReferenceSpaceType referenceSpaceType,
XrExtent2Df* bounds)
XrExtent2Df *bounds)
{
struct oxr_session* sess;
struct oxr_session *sess;
struct oxr_logger log;
OXR_VERIFY_SESSION_AND_INIT_LOG(&log, session, sess,
"xrGetReferenceSpaceBoundsRect");
@ -89,12 +89,12 @@ oxr_xrGetReferenceSpaceBoundsRect(XrSession session,
XrResult
oxr_xrCreateReferenceSpace(XrSession session,
const XrReferenceSpaceCreateInfo* createInfo,
XrSpace* out_space)
const XrReferenceSpaceCreateInfo *createInfo,
XrSpace *out_space)
{
XrResult ret;
struct oxr_session* sess;
struct oxr_space* spc;
struct oxr_session *sess;
struct oxr_space *spc;
struct oxr_logger log;
OXR_VERIFY_SESSION_AND_INIT_LOG(&log, session, sess,
"xrCreateReferenceSpace");
@ -116,10 +116,10 @@ XrResult
oxr_xrLocateSpace(XrSpace space,
XrSpace baseSpace,
XrTime time,
XrSpaceLocation* location)
XrSpaceLocation *location)
{
struct oxr_space* spc;
struct oxr_space* baseSpc;
struct oxr_space *spc;
struct oxr_space *baseSpc;
struct oxr_logger log;
OXR_VERIFY_SPACE_AND_INIT_LOG(&log, space, spc, "xrLocateSpace");
OXR_VERIFY_SPACE_NOT_NULL(&log, baseSpace, baseSpc);
@ -131,7 +131,7 @@ oxr_xrLocateSpace(XrSpace space,
XrResult
oxr_xrDestroySpace(XrSpace space)
{
struct oxr_space* spc;
struct oxr_space *spc;
struct oxr_logger log;
OXR_VERIFY_SPACE_AND_INIT_LOG(&log, space, spc, "xrDestroySpace");

View file

@ -26,10 +26,10 @@
XrResult
oxr_xrEnumerateSwapchainFormats(XrSession session,
uint32_t formatCapacityInput,
uint32_t* formatCountOutput,
int64_t* formats)
uint32_t *formatCountOutput,
int64_t *formats)
{
struct oxr_session* sess;
struct oxr_session *sess;
struct oxr_logger log;
OXR_VERIFY_SESSION_AND_INIT_LOG(&log, session, sess,
"xrEnumerateSwapchainFormats");
@ -40,12 +40,12 @@ oxr_xrEnumerateSwapchainFormats(XrSession session,
XrResult
oxr_xrCreateSwapchain(XrSession session,
const XrSwapchainCreateInfo* createInfo,
XrSwapchain* out_swapchain)
const XrSwapchainCreateInfo *createInfo,
XrSwapchain *out_swapchain)
{
XrResult ret;
struct oxr_session* sess;
struct oxr_swapchain* sc;
struct oxr_session *sess;
struct oxr_swapchain *sc;
struct oxr_logger log;
OXR_VERIFY_SESSION_AND_INIT_LOG(&log, session, sess,
"xrCreateSwapchain");
@ -76,7 +76,7 @@ oxr_xrCreateSwapchain(XrSession session,
XrResult
oxr_xrDestroySwapchain(XrSwapchain swapchain)
{
struct oxr_swapchain* sc;
struct oxr_swapchain *sc;
struct oxr_logger log;
OXR_VERIFY_SWAPCHAIN_AND_INIT_LOG(&log, swapchain, sc,
"xrDestroySwapchain");
@ -87,14 +87,14 @@ oxr_xrDestroySwapchain(XrSwapchain swapchain)
XrResult
oxr_xrEnumerateSwapchainImages(XrSwapchain swapchain,
uint32_t imageCapacityInput,
uint32_t* imageCountOutput,
XrSwapchainImageBaseHeader* images)
uint32_t *imageCountOutput,
XrSwapchainImageBaseHeader *images)
{
struct oxr_swapchain* sc;
struct oxr_swapchain *sc;
struct oxr_logger log;
OXR_VERIFY_SWAPCHAIN_AND_INIT_LOG(&log, swapchain, sc,
"xrEnumerateSwapchainImages");
struct xrt_swapchain* xsc = sc->swapchain;
struct xrt_swapchain *xsc = sc->swapchain;
if (imageCountOutput != NULL) {
*imageCountOutput = xsc->num_images;
@ -113,10 +113,10 @@ oxr_xrEnumerateSwapchainImages(XrSwapchain swapchain,
XrResult
oxr_xrAcquireSwapchainImage(XrSwapchain swapchain,
const XrSwapchainImageAcquireInfo* acquireInfo,
uint32_t* index)
const XrSwapchainImageAcquireInfo *acquireInfo,
uint32_t *index)
{
struct oxr_swapchain* sc;
struct oxr_swapchain *sc;
struct oxr_logger log;
OXR_VERIFY_SWAPCHAIN_AND_INIT_LOG(&log, swapchain, sc,
"xrAcquireSwapchainImage");
@ -129,9 +129,9 @@ oxr_xrAcquireSwapchainImage(XrSwapchain swapchain,
XrResult
oxr_xrWaitSwapchainImage(XrSwapchain swapchain,
const XrSwapchainImageWaitInfo* waitInfo)
const XrSwapchainImageWaitInfo *waitInfo)
{
struct oxr_swapchain* sc;
struct oxr_swapchain *sc;
struct oxr_logger log;
OXR_VERIFY_SWAPCHAIN_AND_INIT_LOG(&log, swapchain, sc,
"xrWaitSwapchainImage");
@ -143,9 +143,9 @@ oxr_xrWaitSwapchainImage(XrSwapchain swapchain,
XrResult
oxr_xrReleaseSwapchainImage(XrSwapchain swapchain,
const XrSwapchainImageReleaseInfo* releaseInfo)
const XrSwapchainImageReleaseInfo *releaseInfo)
{
struct oxr_swapchain* sc;
struct oxr_swapchain *sc;
struct oxr_logger log;
OXR_VERIFY_SWAPCHAIN_AND_INIT_LOG(&log, swapchain, sc,
"xrReleaseSwapchainImage");

View file

@ -28,7 +28,7 @@
* A helper define that verifies the systemId.
*/
#define OXR_VERIFY_SYSTEM_AND_GET(log, inst, sysId, system) \
struct oxr_system* system = NULL; \
struct oxr_system *system = NULL; \
do { \
XrResult ret = \
oxr_system_get_by_id(log, inst, sysId, &system); \
@ -40,17 +40,17 @@
XrResult
oxr_xrGetSystem(XrInstance instance,
const XrSystemGetInfo* getInfo,
XrSystemId* systemId)
const XrSystemGetInfo *getInfo,
XrSystemId *systemId)
{
struct oxr_instance* inst;
struct oxr_instance *inst;
struct oxr_logger log;
OXR_VERIFY_INSTANCE_AND_INIT_LOG(&log, instance, inst, "xrGetSystem");
OXR_VERIFY_ARG_TYPE_AND_NULL(&log, getInfo, XR_TYPE_SYSTEM_GET_INFO);
OXR_VERIFY_ARG_NOT_NULL(&log, systemId);
struct oxr_system* selected = NULL;
struct oxr_system* systems[1] = {&inst->system};
struct oxr_system *selected = NULL;
struct oxr_system *systems[1] = {&inst->system};
uint32_t num_systems = 1;
XrResult ret = oxr_system_select(&log, systems, num_systems,
@ -67,9 +67,9 @@ oxr_xrGetSystem(XrInstance instance,
XrResult
oxr_xrGetSystemProperties(XrInstance instance,
XrSystemId systemId,
XrSystemProperties* properties)
XrSystemProperties *properties)
{
struct oxr_instance* inst;
struct oxr_instance *inst;
struct oxr_logger log;
OXR_VERIFY_INSTANCE_AND_INIT_LOG(&log, instance, inst,
"xrGetSystemProperties");
@ -85,10 +85,10 @@ oxr_xrEnumerateViewConfigurations(
XrInstance instance,
XrSystemId systemId,
uint32_t viewConfigurationTypeCapacityInput,
uint32_t* viewConfigurationTypeCountOutput,
XrViewConfigurationType* viewConfigurationTypes)
uint32_t *viewConfigurationTypeCountOutput,
XrViewConfigurationType *viewConfigurationTypes)
{
struct oxr_instance* inst;
struct oxr_instance *inst;
struct oxr_logger log;
OXR_VERIFY_INSTANCE_AND_INIT_LOG(&log, instance, inst,
"xrEnumerateViewConfigurations");
@ -105,10 +105,10 @@ oxr_xrEnumerateEnvironmentBlendModes(
XrSystemId systemId,
XrViewConfigurationType viewConfigurationType,
uint32_t environmentBlendModeCapacityInput,
uint32_t* environmentBlendModeCountOutput,
XrEnvironmentBlendMode* environmentBlendModes)
uint32_t *environmentBlendModeCountOutput,
XrEnvironmentBlendMode *environmentBlendModes)
{
struct oxr_instance* inst;
struct oxr_instance *inst;
struct oxr_logger log;
OXR_VERIFY_INSTANCE_AND_INIT_LOG(&log, instance, inst,
"xrEnumerateEnvironmentBlendModes");
@ -124,9 +124,9 @@ oxr_xrGetViewConfigurationProperties(
XrInstance instance,
XrSystemId systemId,
XrViewConfigurationType viewConfigurationType,
XrViewConfigurationProperties* configurationProperties)
XrViewConfigurationProperties *configurationProperties)
{
struct oxr_instance* inst;
struct oxr_instance *inst;
struct oxr_logger log;
OXR_VERIFY_INSTANCE_AND_INIT_LOG(&log, instance, inst,
"xrGetViewConfigurationProperties");
@ -144,10 +144,10 @@ oxr_xrEnumerateViewConfigurationViews(
XrSystemId systemId,
XrViewConfigurationType viewConfigurationType,
uint32_t viewCapacityInput,
uint32_t* viewCountOutput,
XrViewConfigurationView* views)
uint32_t *viewCountOutput,
XrViewConfigurationView *views)
{
struct oxr_instance* inst;
struct oxr_instance *inst;
struct oxr_logger log;
OXR_VERIFY_INSTANCE_AND_INIT_LOG(&log, instance, inst,
"xrEnumerateViewConfigurationViews");
@ -171,9 +171,9 @@ XrResult
oxr_xrGetOpenGLGraphicsRequirementsKHR(
XrInstance instance,
XrSystemId systemId,
XrGraphicsRequirementsOpenGLKHR* graphicsRequirements)
XrGraphicsRequirementsOpenGLKHR *graphicsRequirements)
{
struct oxr_instance* inst;
struct oxr_instance *inst;
struct oxr_logger log;
OXR_VERIFY_INSTANCE_AND_INIT_LOG(&log, instance, inst,
"xrGetOpenGLGraphicsRequirementsKHR");
@ -208,10 +208,10 @@ XrResult
oxr_xrGetVulkanInstanceExtensionsKHR(XrInstance instance,
XrSystemId systemId,
uint32_t namesCapacityInput,
uint32_t* namesCountOutput,
char* namesString)
uint32_t *namesCountOutput,
char *namesString)
{
struct oxr_instance* inst;
struct oxr_instance *inst;
struct oxr_logger log;
OXR_VERIFY_INSTANCE_AND_INIT_LOG(&log, instance, inst,
"xrGetVulkanInstanceExtensionsKHR");
@ -225,10 +225,10 @@ XrResult
oxr_xrGetVulkanDeviceExtensionsKHR(XrInstance instance,
XrSystemId systemId,
uint32_t namesCapacityInput,
uint32_t* namesCountOutput,
char* namesString)
uint32_t *namesCountOutput,
char *namesString)
{
struct oxr_instance* inst;
struct oxr_instance *inst;
struct oxr_logger log;
OXR_VERIFY_INSTANCE_AND_INIT_LOG(&log, instance, inst,
"xrGetVulkanDeviceExtensionsKHR");
@ -239,15 +239,15 @@ oxr_xrGetVulkanDeviceExtensionsKHR(XrInstance instance,
}
VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL
vkGetInstanceProcAddr(VkInstance instance, const char* pName);
vkGetInstanceProcAddr(VkInstance instance, const char *pName);
XrResult
oxr_xrGetVulkanGraphicsDeviceKHR(XrInstance instance,
XrSystemId systemId,
VkInstance vkInstance,
VkPhysicalDevice* vkPhysicalDevice)
VkPhysicalDevice *vkPhysicalDevice)
{
struct oxr_instance* inst;
struct oxr_instance *inst;
struct oxr_logger log;
OXR_VERIFY_INSTANCE_AND_INIT_LOG(&log, instance, inst,
"xrGetVulkanGraphicsDeviceKHR");
@ -263,9 +263,9 @@ XrResult
oxr_xrGetVulkanGraphicsRequirementsKHR(
XrInstance instance,
XrSystemId systemId,
XrGraphicsRequirementsVulkanKHR* graphicsRequirements)
XrGraphicsRequirementsVulkanKHR *graphicsRequirements)
{
struct oxr_instance* inst;
struct oxr_instance *inst;
struct oxr_logger log;
OXR_VERIFY_INSTANCE_AND_INIT_LOG(&log, instance, inst,
"xrGetVulkanGraphicsRequirementsKHR");

View file

@ -26,14 +26,14 @@ extern "C" {
if (new_thing->handle.debug != OXR_XR_DEBUG_##THING) { \
return oxr_error(log, XR_ERROR_HANDLE_INVALID, \
"(" #thing " == %p)", \
(void*)new_thing); \
(void *)new_thing); \
} \
if (new_thing->handle.state != OXR_HANDLE_STATE_LIVE) { \
return oxr_error(log, XR_ERROR_HANDLE_INVALID, \
" state == %s (" #thing " == %p)", \
oxr_handle_state_to_string( \
new_thing->handle.state), \
(void*)new_thing); \
(void *)new_thing); \
} \
oxr_log_set_instance(log, lookup); \
} while (0)
@ -47,7 +47,7 @@ extern "C" {
new_arg = (__typeof__(new_arg))arg; \
if (new_arg->handle.debug != OXR_XR_DEBUG_##THING) { \
return oxr_error(log, XR_ERROR_HANDLE_INVALID, \
"(" #arg " == %p)", (void*)new_arg); \
"(" #arg " == %p)", (void *)new_arg); \
} \
} while (0)
@ -153,13 +153,13 @@ extern "C" {
#define OXR_VERIFY_POSE(log, p) \
do { \
if (!math_quat_validate((struct xrt_quat*)&p.orientation)) { \
if (!math_quat_validate((struct xrt_quat *)&p.orientation)) { \
return oxr_error(log, XR_ERROR_POSE_INVALID, \
"(" #p \
".orientation) is not a valid quat"); \
} \
\
if (!math_vec3_validate((struct xrt_vec3*)&p.position)) { \
if (!math_vec3_validate((struct xrt_vec3 *)&p.position)) { \
return oxr_error(log, XR_ERROR_POSE_INVALID, \
"(" #p ".position) is not valid"); \
} \
@ -172,9 +172,9 @@ extern "C" {
*/
XrResult
oxr_verify_full_path_c(struct oxr_logger* log,
const char* path,
const char* name);
oxr_verify_full_path_c(struct oxr_logger *log,
const char *path,
const char *name);
/*!
* Verify a full path.
@ -182,45 +182,45 @@ oxr_verify_full_path_c(struct oxr_logger* log,
* Length not including zero terminator character but must be there.
*/
XrResult
oxr_verify_full_path(struct oxr_logger* log,
const char* path,
oxr_verify_full_path(struct oxr_logger *log,
const char *path,
size_t length,
const char* name);
const char *name);
/*!
* Verify a single path level that sits inside of a fixed sized array.
*/
XrResult
oxr_verify_fixed_size_single_level_path(struct oxr_logger*,
const char* path,
oxr_verify_fixed_size_single_level_path(struct oxr_logger *,
const char *path,
uint32_t array_size,
const char* name);
const char *name);
/*!
* Verify an arbitrary UTF-8 string that sits inside of a fixed sized array.
*/
XrResult
oxr_verify_localized_name(struct oxr_logger*,
const char* string,
oxr_verify_localized_name(struct oxr_logger *,
const char *string,
uint32_t array_size,
const char* name);
const char *name);
/*!
* Verify a set of subaction paths for action creation.
*/
XrResult
oxr_verify_subaction_paths_create(struct oxr_logger* log,
struct oxr_instance* inst,
oxr_verify_subaction_paths_create(struct oxr_logger *log,
struct oxr_instance *inst,
uint32_t countSubactionPaths,
const XrPath* subactionPaths,
const char* variable);
const XrPath *subactionPaths,
const char *variable);
/*!
* Verify a set of subaction paths for action sync.
*/
XrResult
oxr_verify_subaction_path_sync(struct oxr_logger* log,
struct oxr_instance* inst,
oxr_verify_subaction_path_sync(struct oxr_logger *log,
struct oxr_instance *inst,
XrPath path,
uint32_t index);
@ -228,25 +228,25 @@ oxr_verify_subaction_path_sync(struct oxr_logger* log,
* Verify a set of subaction paths for action state get.
*/
XrResult
oxr_verify_subaction_path_get(struct oxr_logger* log,
struct oxr_instance* inst,
oxr_verify_subaction_path_get(struct oxr_logger *log,
struct oxr_instance *inst,
XrPath path,
const struct oxr_sub_paths* act_sub_paths,
struct oxr_sub_paths* out_sub_paths,
const char* variable);
const struct oxr_sub_paths *act_sub_paths,
struct oxr_sub_paths *out_sub_paths,
const char *variable);
XrResult
oxr_verify_XrSessionCreateInfo(struct oxr_logger*,
const struct oxr_instance*,
const XrSessionCreateInfo*);
oxr_verify_XrSessionCreateInfo(struct oxr_logger *,
const struct oxr_instance *,
const XrSessionCreateInfo *);
XrResult
oxr_verify_XrGraphicsBindingOpenGLXlibKHR(
struct oxr_logger*, const XrGraphicsBindingOpenGLXlibKHR*);
struct oxr_logger *, const XrGraphicsBindingOpenGLXlibKHR *);
XrResult
oxr_verify_XrGraphicsBindingVulkanKHR(struct oxr_logger*,
const XrGraphicsBindingVulkanKHR*);
oxr_verify_XrGraphicsBindingVulkanKHR(struct oxr_logger *,
const XrGraphicsBindingVulkanKHR *);
/*!
* @}

View file

@ -27,11 +27,11 @@ extern "C" {
* Prefer using OXR_GET_INPUT_FROM_CHAIN() instead, since it includes the
* casting.
*/
static inline XrBaseInStructure const*
oxr_find_input_in_chain(const void* ptr, XrStructureType desired)
static inline XrBaseInStructure const *
oxr_find_input_in_chain(const void *ptr, XrStructureType desired)
{
while (ptr != NULL) {
XrBaseInStructure const* base = (XrBaseInStructure const*)ptr;
XrBaseInStructure const *base = (XrBaseInStructure const *)ptr;
if (base->type == desired) {
return base;
}
@ -50,7 +50,7 @@ oxr_find_input_in_chain(const void* ptr, XrStructureType desired)
* XrStructureType value) and TYPE (a type name) actually match!
*/
#define OXR_GET_INPUT_FROM_CHAIN(PTR, STRUCTURE_TYPE_ENUM, TYPE) \
((TYPE const*)oxr_find_input_in_chain(PTR, STRUCTURE_TYPE_ENUM))
((TYPE const *)oxr_find_input_in_chain(PTR, STRUCTURE_TYPE_ENUM))
/*!
* Finds an output struct of the given type in a next-chain.
@ -60,11 +60,11 @@ oxr_find_input_in_chain(const void* ptr, XrStructureType desired)
* Prefer using OXR_GET_OUTPUT_FROM_CHAIN() instead, since it includes the
* casting.
*/
static inline XrBaseOutStructure*
oxr_find_output_in_chain(void* ptr, XrStructureType desired)
static inline XrBaseOutStructure *
oxr_find_output_in_chain(void *ptr, XrStructureType desired)
{
while (ptr != NULL) {
XrBaseOutStructure* base = (XrBaseOutStructure*)ptr;
XrBaseOutStructure *base = (XrBaseOutStructure *)ptr;
if (base->type == desired) {
return base;
}
@ -83,7 +83,7 @@ oxr_find_output_in_chain(void* ptr, XrStructureType desired)
* XrStructureType value) and TYPE (a type name) actually match!
*/
#define OXR_GET_OUTPUT_FROM_CHAIN(PTR, STRUCTURE_TYPE_ENUM, TYPE) \
((TYPE*)oxr_find_output_in_chain(PTR, STRUCTURE_TYPE_ENUM))
((TYPE *)oxr_find_output_in_chain(PTR, STRUCTURE_TYPE_ENUM))
/*!
* @}

View file

@ -30,51 +30,51 @@
*/
static void
oxr_session_get_source_set(struct oxr_session* sess,
oxr_session_get_source_set(struct oxr_session *sess,
XrActionSet actionSet,
struct oxr_source_set** src_set,
struct oxr_action_set** act_set);
struct oxr_source_set **src_set,
struct oxr_action_set **act_set);
static void
oxr_session_get_source(struct oxr_session* sess,
oxr_session_get_source(struct oxr_session *sess,
uint32_t act_key,
struct oxr_source** out_src);
struct oxr_source **out_src);
static void
oxr_source_cache_update(struct oxr_logger* log,
struct oxr_session* sess,
struct oxr_action* act,
struct oxr_source_cache* cache,
oxr_source_cache_update(struct oxr_logger *log,
struct oxr_session *sess,
struct oxr_action *act,
struct oxr_source_cache *cache,
int64_t time,
bool select);
static void
oxr_source_update(struct oxr_logger* log,
struct oxr_session* sess,
struct oxr_action* act,
oxr_source_update(struct oxr_logger *log,
struct oxr_session *sess,
struct oxr_action *act,
int64_t time,
struct oxr_sub_paths sub_paths);
static void
oxr_source_bind_inputs(struct oxr_logger* log,
struct oxr_sink_logger* slog,
struct oxr_session* sess,
struct oxr_action* act,
struct oxr_source_cache* cache,
struct oxr_interaction_profile* profile,
oxr_source_bind_inputs(struct oxr_logger *log,
struct oxr_sink_logger *slog,
struct oxr_session *sess,
struct oxr_action *act,
struct oxr_source_cache *cache,
struct oxr_interaction_profile *profile,
enum oxr_sub_action_path sub_path);
static XrResult
oxr_source_destroy_cb(struct oxr_logger* log, struct oxr_handle_base* hb);
oxr_source_destroy_cb(struct oxr_logger *log, struct oxr_handle_base *hb);
static XrResult
oxr_source_create(struct oxr_logger* log,
struct oxr_source_set* src_set,
struct oxr_action* act,
struct oxr_interaction_profile* head,
struct oxr_interaction_profile* left,
struct oxr_interaction_profile* right,
struct oxr_interaction_profile* gamepad);
oxr_source_create(struct oxr_logger *log,
struct oxr_source_set *src_set,
struct oxr_action *act,
struct oxr_interaction_profile *head,
struct oxr_interaction_profile *left,
struct oxr_interaction_profile *right,
struct oxr_interaction_profile *gamepad);
/*
@ -84,10 +84,10 @@ oxr_source_create(struct oxr_logger* log,
*/
static XrResult
oxr_action_set_destroy_cb(struct oxr_logger* log, struct oxr_handle_base* hb)
oxr_action_set_destroy_cb(struct oxr_logger *log, struct oxr_handle_base *hb)
{
//! @todo Move to oxr_objects.h
struct oxr_action_set* act_set = (struct oxr_action_set*)hb;
struct oxr_action_set *act_set = (struct oxr_action_set *)hb;
free(act_set);
@ -95,16 +95,16 @@ oxr_action_set_destroy_cb(struct oxr_logger* log, struct oxr_handle_base* hb)
}
XrResult
oxr_action_set_create(struct oxr_logger* log,
struct oxr_instance* inst,
const XrActionSetCreateInfo* createInfo,
struct oxr_action_set** out_act_set)
oxr_action_set_create(struct oxr_logger *log,
struct oxr_instance *inst,
const XrActionSetCreateInfo *createInfo,
struct oxr_action_set **out_act_set)
{
// Mod music for all!
static uint32_t key_gen = 1;
//! @todo Implement more fully.
struct oxr_action_set* act_set = NULL;
struct oxr_action_set *act_set = NULL;
OXR_ALLOCATE_HANDLE_OR_RETURN(log, act_set, OXR_XR_DEBUG_ACTIONSET,
oxr_action_set_destroy_cb, &inst->handle);
@ -127,10 +127,10 @@ oxr_action_set_create(struct oxr_logger* log,
*/
static XrResult
oxr_action_destroy_cb(struct oxr_logger* log, struct oxr_handle_base* hb)
oxr_action_destroy_cb(struct oxr_logger *log, struct oxr_handle_base *hb)
{
//! @todo Move to oxr_objects.h
struct oxr_action* act = (struct oxr_action*)hb;
struct oxr_action *act = (struct oxr_action *)hb;
free(act);
@ -138,12 +138,12 @@ oxr_action_destroy_cb(struct oxr_logger* log, struct oxr_handle_base* hb)
}
XrResult
oxr_action_create(struct oxr_logger* log,
struct oxr_action_set* act_set,
const XrActionCreateInfo* createInfo,
struct oxr_action** out_act)
oxr_action_create(struct oxr_logger *log,
struct oxr_action_set *act_set,
const XrActionCreateInfo *createInfo,
struct oxr_action **out_act)
{
struct oxr_instance* inst = act_set->inst;
struct oxr_instance *inst = act_set->inst;
struct oxr_sub_paths sub_paths = {0};
// Mod music for all!
@ -153,7 +153,7 @@ oxr_action_create(struct oxr_logger* log,
createInfo->countSubactionPaths,
createInfo->subactionPaths, &sub_paths);
struct oxr_action* act = NULL;
struct oxr_action *act = NULL;
OXR_ALLOCATE_HANDLE_OR_RETURN(log, act, OXR_XR_DEBUG_ACTION,
oxr_action_destroy_cb, &act_set->handle);
act->key = key_gen++;
@ -176,13 +176,13 @@ oxr_action_create(struct oxr_logger* log,
*/
void
oxr_classify_sub_action_paths(struct oxr_logger* log,
struct oxr_instance* inst,
oxr_classify_sub_action_paths(struct oxr_logger *log,
struct oxr_instance *inst,
uint32_t num_subaction_paths,
const XrPath* subaction_paths,
struct oxr_sub_paths* sub_paths)
const XrPath *subaction_paths,
struct oxr_sub_paths *sub_paths)
{
const char* str = NULL;
const char *str = NULL;
size_t length = 0;
// Reset the sub_paths completely.
@ -218,13 +218,13 @@ oxr_classify_sub_action_paths(struct oxr_logger* log,
}
XrResult
oxr_source_get_pose_input(struct oxr_logger* log,
struct oxr_session* sess,
oxr_source_get_pose_input(struct oxr_logger *log,
struct oxr_session *sess,
uint32_t act_key,
const struct oxr_sub_paths* sub_paths,
struct oxr_source_input** out_input)
const struct oxr_sub_paths *sub_paths,
struct oxr_source_input **out_input)
{
struct oxr_source* src = NULL;
struct oxr_source *src = NULL;
oxr_session_get_source(sess, act_key, &src);
@ -266,12 +266,12 @@ oxr_source_get_pose_input(struct oxr_logger* log,
*/
static bool
do_inputs(struct oxr_binding* bind,
struct xrt_device* xdev,
do_inputs(struct oxr_binding *bind,
struct xrt_device *xdev,
struct oxr_source_input inputs[16],
uint32_t* num_inputs)
uint32_t *num_inputs)
{
struct xrt_input* input = NULL;
struct xrt_input *input = NULL;
bool found = false;
for (size_t i = 0; i < bind->num_inputs; i++) {
@ -287,12 +287,12 @@ do_inputs(struct oxr_binding* bind,
}
static bool
do_outputs(struct oxr_binding* bind,
struct xrt_device* xdev,
do_outputs(struct oxr_binding *bind,
struct xrt_device *xdev,
struct oxr_source_output outputs[16],
uint32_t* num_outputs)
uint32_t *num_outputs)
{
struct xrt_output* output = NULL;
struct xrt_output *output = NULL;
bool found = false;
for (size_t i = 0; i < bind->num_outputs; i++) {
@ -308,13 +308,13 @@ do_outputs(struct oxr_binding* bind,
}
static bool
do_io_bindings(struct oxr_binding* b,
struct oxr_action* act,
struct xrt_device* xdev,
do_io_bindings(struct oxr_binding *b,
struct oxr_action *act,
struct xrt_device *xdev,
struct oxr_source_input inputs[16],
uint32_t* num_inputs,
uint32_t *num_inputs,
struct oxr_source_output outputs[16],
uint32_t* num_outputs)
uint32_t *num_outputs)
{
bool found = false;
@ -328,21 +328,21 @@ do_io_bindings(struct oxr_binding* b,
}
static void
get_binding(struct oxr_logger* log,
struct oxr_sink_logger* slog,
struct oxr_session* sess,
struct oxr_action* act,
struct oxr_interaction_profile* profile,
get_binding(struct oxr_logger *log,
struct oxr_sink_logger *slog,
struct oxr_session *sess,
struct oxr_action *act,
struct oxr_interaction_profile *profile,
enum oxr_sub_action_path sub_path,
struct oxr_source_input inputs[16],
uint32_t* num_inputs,
uint32_t *num_inputs,
struct oxr_source_output outputs[16],
uint32_t* num_outputs)
uint32_t *num_outputs)
{
struct xrt_device* xdev = NULL;
struct oxr_binding* bindings[32];
const char* profile_str;
const char* user_path_str;
struct xrt_device *xdev = NULL;
struct oxr_binding *bindings[32];
const char *profile_str;
const char *user_path_str;
size_t length;
//! @todo This probably falls on its head if the application doesn't use
@ -397,8 +397,8 @@ get_binding(struct oxr_logger* log,
}
for (size_t i = 0; i < num; i++) {
const char* str = NULL;
struct oxr_binding* b = bindings[i];
const char *str = NULL;
struct oxr_binding *b = bindings[i];
// Just pick the first path.
oxr_path_get_string(log, sess->sys->inst, b->paths[0], &str,
@ -429,10 +429,10 @@ get_binding(struct oxr_logger* log,
*/
static XrResult
oxr_source_set_destroy_cb(struct oxr_logger* log, struct oxr_handle_base* hb)
oxr_source_set_destroy_cb(struct oxr_logger *log, struct oxr_handle_base *hb)
{
//! @todo Move to oxr_objects.h
struct oxr_source_set* src_set = (struct oxr_source_set*)hb;
struct oxr_source_set *src_set = (struct oxr_source_set *)hb;
free(src_set);
@ -440,12 +440,12 @@ oxr_source_set_destroy_cb(struct oxr_logger* log, struct oxr_handle_base* hb)
}
static XrResult
oxr_source_set_create(struct oxr_logger* log,
struct oxr_session* sess,
struct oxr_action_set* act_set,
struct oxr_source_set** out_src_set)
oxr_source_set_create(struct oxr_logger *log,
struct oxr_session *sess,
struct oxr_action_set *act_set,
struct oxr_source_set **out_src_set)
{
struct oxr_source_set* src_set = NULL;
struct oxr_source_set *src_set = NULL;
OXR_ALLOCATE_HANDLE_OR_RETURN(log, src_set, OXR_XR_DEBUG_SOURCESET,
oxr_source_set_destroy_cb, &sess->handle);
@ -465,10 +465,10 @@ oxr_source_set_create(struct oxr_logger* log,
*/
static XrResult
oxr_source_destroy_cb(struct oxr_logger* log, struct oxr_handle_base* hb)
oxr_source_destroy_cb(struct oxr_logger *log, struct oxr_handle_base *hb)
{
//! @todo Move to oxr_objects.h
struct oxr_source* src = (struct oxr_source*)hb;
struct oxr_source *src = (struct oxr_source *)hb;
free(src->user.inputs);
free(src->user.outputs);
@ -486,16 +486,16 @@ oxr_source_destroy_cb(struct oxr_logger* log, struct oxr_handle_base* hb)
}
static XrResult
oxr_source_create(struct oxr_logger* log,
struct oxr_source_set* src_set,
struct oxr_action* act,
struct oxr_interaction_profile* head,
struct oxr_interaction_profile* left,
struct oxr_interaction_profile* right,
struct oxr_interaction_profile* gamepad)
oxr_source_create(struct oxr_logger *log,
struct oxr_source_set *src_set,
struct oxr_action *act,
struct oxr_interaction_profile *head,
struct oxr_interaction_profile *left,
struct oxr_interaction_profile *right,
struct oxr_interaction_profile *gamepad)
{
struct oxr_session* sess = src_set->sess;
struct oxr_source* src = NULL;
struct oxr_session *sess = src_set->sess;
struct oxr_source *src = NULL;
struct oxr_sink_logger slog = {0};
OXR_ALLOCATE_HANDLE_OR_RETURN(log, src, OXR_XR_DEBUG_SOURCE,
oxr_source_destroy_cb, &src_set->handle);
@ -541,9 +541,9 @@ oxr_source_create(struct oxr_logger* log,
}
static void
oxr_source_cache_stop_output(struct oxr_logger* log,
struct oxr_session* sess,
struct oxr_source_cache* cache)
oxr_source_cache_stop_output(struct oxr_logger *log,
struct oxr_session *sess,
struct oxr_source_cache *cache)
{
// Set this as stopped.
cache->stop_output_time = 0;
@ -551,8 +551,8 @@ oxr_source_cache_stop_output(struct oxr_logger* log,
union xrt_output_value value = {0};
for (uint32_t i = 0; i < cache->num_outputs; i++) {
struct oxr_source_output* output = &cache->outputs[i];
struct xrt_device* xdev = output->xdev;
struct oxr_source_output *output = &cache->outputs[i];
struct xrt_device *xdev = output->xdev;
xdev->set_output(xdev, output->name,
sess->sys->inst->timekeeping, &value);
@ -560,10 +560,10 @@ oxr_source_cache_stop_output(struct oxr_logger* log,
}
static void
oxr_source_cache_update(struct oxr_logger* log,
struct oxr_session* sess,
struct oxr_action* act,
struct oxr_source_cache* cache,
oxr_source_cache_update(struct oxr_logger *log,
struct oxr_session *sess,
struct oxr_action *act,
struct oxr_source_cache *cache,
int64_t time,
bool selected)
{
@ -603,13 +603,13 @@ oxr_source_cache_update(struct oxr_logger* log,
}
static void
oxr_source_update(struct oxr_logger* log,
struct oxr_session* sess,
struct oxr_action* act,
oxr_source_update(struct oxr_logger *log,
struct oxr_session *sess,
struct oxr_action *act,
int64_t time,
struct oxr_sub_paths sub_paths)
{
struct oxr_source* src = NULL;
struct oxr_source *src = NULL;
oxr_session_get_source(sess, act->key, &src);
// This really shouldn't be happening.
@ -631,12 +631,12 @@ oxr_source_update(struct oxr_logger* log,
}
static void
oxr_source_bind_inputs(struct oxr_logger* log,
struct oxr_sink_logger* slog,
struct oxr_session* sess,
struct oxr_action* act,
struct oxr_source_cache* cache,
struct oxr_interaction_profile* profile,
oxr_source_bind_inputs(struct oxr_logger *log,
struct oxr_sink_logger *slog,
struct oxr_session *sess,
struct oxr_action *act,
struct oxr_source_cache *cache,
struct oxr_interaction_profile *profile,
enum oxr_sub_action_path sub_path)
{
struct oxr_source_input inputs[16] = {0};
@ -678,45 +678,45 @@ oxr_source_bind_inputs(struct oxr_logger* log,
*/
static void
oxr_session_get_source_set(struct oxr_session* sess,
oxr_session_get_source_set(struct oxr_session *sess,
XrActionSet actionSet,
struct oxr_source_set** src_set,
struct oxr_action_set** act_set)
struct oxr_source_set **src_set,
struct oxr_action_set **act_set)
{
void* ptr = NULL;
*act_set = (struct oxr_action_set*)actionSet;
void *ptr = NULL;
*act_set = (struct oxr_action_set *)actionSet;
int ret = u_hashmap_int_find(sess->act_sets, (*act_set)->key, &ptr);
if (ret == 0) {
*src_set = (struct oxr_source_set*)ptr;
*src_set = (struct oxr_source_set *)ptr;
}
}
static void
oxr_session_get_source(struct oxr_session* sess,
oxr_session_get_source(struct oxr_session *sess,
uint32_t act_key,
struct oxr_source** out_src)
struct oxr_source **out_src)
{
void* ptr = NULL;
void *ptr = NULL;
int ret = u_hashmap_int_find(sess->sources, act_key, &ptr);
if (ret == 0) {
*out_src = (struct oxr_source*)ptr;
*out_src = (struct oxr_source *)ptr;
}
}
XrResult
oxr_session_attach_action_sets(struct oxr_logger* log,
struct oxr_session* sess,
const XrSessionActionSetsAttachInfo* bindInfo)
oxr_session_attach_action_sets(struct oxr_logger *log,
struct oxr_session *sess,
const XrSessionActionSetsAttachInfo *bindInfo)
{
struct oxr_instance* inst = sess->sys->inst;
struct oxr_interaction_profile* head = NULL;
struct oxr_interaction_profile* left = NULL;
struct oxr_interaction_profile* right = NULL;
struct oxr_action_set* act_set = NULL;
struct oxr_source_set* src_set = NULL;
struct oxr_action* act = NULL;
struct oxr_instance *inst = sess->sys->inst;
struct oxr_interaction_profile *head = NULL;
struct oxr_interaction_profile *left = NULL;
struct oxr_interaction_profile *right = NULL;
struct oxr_action_set *act_set = NULL;
struct oxr_source_set *src_set = NULL;
struct oxr_action *act = NULL;
oxr_find_profile_for_device(log, inst, sess->sys->head, &head);
oxr_find_profile_for_device(log, inst, sess->sys->left, &left);
@ -724,13 +724,13 @@ oxr_session_attach_action_sets(struct oxr_logger* log,
// Has any of the bound action sets been updated.
for (uint32_t i = 0; i < bindInfo->countActionSets; i++) {
act_set = (struct oxr_action_set*)bindInfo->actionSets[i];
act_set = (struct oxr_action_set *)bindInfo->actionSets[i];
act_set->attached = true;
oxr_source_set_create(log, sess, act_set, &src_set);
for (uint32_t k = 0; k < XRT_MAX_HANDLE_CHILDREN; k++) {
act = (struct oxr_action*)act_set->handle.children[k];
act = (struct oxr_action *)act_set->handle.children[k];
if (act == NULL) {
continue;
}
@ -756,13 +756,13 @@ oxr_session_attach_action_sets(struct oxr_logger* log,
}
XrResult
oxr_action_sync_data(struct oxr_logger* log,
struct oxr_session* sess,
oxr_action_sync_data(struct oxr_logger *log,
struct oxr_session *sess,
uint32_t countActionSets,
const XrActiveActionSet* actionSets)
const XrActiveActionSet *actionSets)
{
struct oxr_action_set* act_set = NULL;
struct oxr_source_set* src_set = NULL;
struct oxr_action_set *act_set = NULL;
struct oxr_source_set *src_set = NULL;
// Check that all action sets has been attached.
for (uint32_t i = 0; i < countActionSets; i++) {
@ -788,8 +788,8 @@ oxr_action_sync_data(struct oxr_logger* log,
// Go over all action sets and update them.
for (uint32_t i = 0; i < countActionSets; i++) {
struct oxr_sub_paths sub_paths;
struct oxr_action_set* act_set =
(struct oxr_action_set*)actionSets[i].actionSet;
struct oxr_action_set *act_set =
(struct oxr_action_set *)actionSets[i].actionSet;
oxr_classify_sub_action_paths(log, sess->sys->inst, 1,
&actionSets[i].subactionPath,
@ -798,8 +798,8 @@ oxr_action_sync_data(struct oxr_logger* log,
for (uint32_t k = 0; k < XRT_MAX_HANDLE_CHILDREN; k++) {
// This assumes that all children of a
// action set are actions.
struct oxr_action* act =
(struct oxr_action*)act_set->handle.children[k];
struct oxr_action *act =
(struct oxr_action *)act_set->handle.children[k];
if (act == NULL) {
continue;
@ -821,8 +821,8 @@ oxr_action_sync_data(struct oxr_logger* log,
*/
static void
get_state_from_state_bool(struct oxr_source_state* state,
XrActionStateBoolean* data)
get_state_from_state_bool(struct oxr_source_state *state,
XrActionStateBoolean *data)
{
data->currentState = state->boolean;
data->lastChangeTime = state->timestamp;
@ -840,8 +840,8 @@ get_state_from_state_bool(struct oxr_source_state* state,
}
static void
get_state_from_state_vec1(struct oxr_source_state* state,
XrActionStateFloat* data)
get_state_from_state_vec1(struct oxr_source_state *state,
XrActionStateFloat *data)
{
data->currentState = state->vec1.x;
data->lastChangeTime = state->timestamp;
@ -859,8 +859,8 @@ get_state_from_state_vec1(struct oxr_source_state* state,
}
static void
get_state_from_state_vec2(struct oxr_source_state* state,
XrActionStateVector2f* data)
get_state_from_state_vec2(struct oxr_source_state *state,
XrActionStateVector2f *data)
{
data->currentState.x = state->vec2.x;
data->currentState.y = state->vec2.y;
@ -903,13 +903,13 @@ get_state_from_state_vec2(struct oxr_source_state* state,
}
XrResult
oxr_action_get_boolean(struct oxr_logger* log,
struct oxr_session* sess,
oxr_action_get_boolean(struct oxr_logger *log,
struct oxr_session *sess,
uint64_t key,
struct oxr_sub_paths sub_paths,
XrActionStateBoolean* data)
XrActionStateBoolean *data)
{
struct oxr_source* src = NULL;
struct oxr_source *src = NULL;
oxr_session_get_source(sess, key, &src);
@ -932,13 +932,13 @@ oxr_action_get_boolean(struct oxr_logger* log,
}
XrResult
oxr_action_get_vector1f(struct oxr_logger* log,
struct oxr_session* sess,
oxr_action_get_vector1f(struct oxr_logger *log,
struct oxr_session *sess,
uint64_t key,
struct oxr_sub_paths sub_paths,
XrActionStateFloat* data)
XrActionStateFloat *data)
{
struct oxr_source* src = NULL;
struct oxr_source *src = NULL;
oxr_session_get_source(sess, key, &src);
@ -961,13 +961,13 @@ oxr_action_get_vector1f(struct oxr_logger* log,
}
XrResult
oxr_action_get_vector2f(struct oxr_logger* log,
struct oxr_session* sess,
oxr_action_get_vector2f(struct oxr_logger *log,
struct oxr_session *sess,
uint64_t key,
struct oxr_sub_paths sub_paths,
XrActionStateVector2f* data)
XrActionStateVector2f *data)
{
struct oxr_source* src = NULL;
struct oxr_source *src = NULL;
oxr_session_get_source(sess, key, &src);
@ -990,13 +990,13 @@ oxr_action_get_vector2f(struct oxr_logger* log,
}
XrResult
oxr_action_get_pose(struct oxr_logger* log,
struct oxr_session* sess,
oxr_action_get_pose(struct oxr_logger *log,
struct oxr_session *sess,
uint64_t key,
struct oxr_sub_paths sub_paths,
XrActionStatePose* data)
XrActionStatePose *data)
{
struct oxr_source* src = NULL;
struct oxr_source *src = NULL;
oxr_session_get_source(sess, key, &src);
@ -1033,10 +1033,10 @@ oxr_action_get_pose(struct oxr_logger* log,
*/
static void
set_source_output_vibration(struct oxr_session* sess,
struct oxr_source_cache* cache,
set_source_output_vibration(struct oxr_session *sess,
struct oxr_source_cache *cache,
int64_t stop,
const XrHapticVibration* data)
const XrHapticVibration *data)
{
cache->stop_output_time = stop;
@ -1045,8 +1045,8 @@ set_source_output_vibration(struct oxr_session* sess,
value.vibration.amplitude = data->amplitude;
for (uint32_t i = 0; i < cache->num_outputs; i++) {
struct oxr_source_output* output = &cache->outputs[i];
struct xrt_device* xdev = output->xdev;
struct oxr_source_output *output = &cache->outputs[i];
struct xrt_device *xdev = output->xdev;
xdev->set_output(xdev, output->name,
sess->sys->inst->timekeeping, &value);
@ -1056,13 +1056,13 @@ set_source_output_vibration(struct oxr_session* sess,
XrResult
oxr_action_apply_haptic_feedback(struct oxr_logger* log,
struct oxr_session* sess,
oxr_action_apply_haptic_feedback(struct oxr_logger *log,
struct oxr_session *sess,
uint64_t key,
struct oxr_sub_paths sub_paths,
const XrHapticBaseHeader* hapticEvent)
const XrHapticBaseHeader *hapticEvent)
{
struct oxr_source* src = NULL;
struct oxr_source *src = NULL;
oxr_session_get_source(sess, key, &src);
@ -1070,7 +1070,7 @@ oxr_action_apply_haptic_feedback(struct oxr_logger* log,
return XR_SUCCESS;
}
const XrHapticVibration* data = (const XrHapticVibration*)hapticEvent;
const XrHapticVibration *data = (const XrHapticVibration *)hapticEvent;
int64_t now = time_state_get_now(sess->sys->inst->timekeeping);
int64_t stop = data->duration <= 0 ? now : now + data->duration;
@ -1097,12 +1097,12 @@ oxr_action_apply_haptic_feedback(struct oxr_logger* log,
}
XrResult
oxr_action_stop_haptic_feedback(struct oxr_logger* log,
struct oxr_session* sess,
oxr_action_stop_haptic_feedback(struct oxr_logger *log,
struct oxr_session *sess,
uint64_t key,
struct oxr_sub_paths sub_paths)
{
struct oxr_source* src = NULL;
struct oxr_source *src = NULL;
oxr_session_get_source(sess, key, &src);

View file

@ -46,7 +46,7 @@ valid_path_char(const char c)
}
static bool
contains_zero(const char* path, uint32_t size)
contains_zero(const char *path, uint32_t size)
{
for (uint32_t i = 0; i < size; i++) {
if (path[i] == '\0') {
@ -58,10 +58,10 @@ contains_zero(const char* path, uint32_t size)
}
extern "C" XrResult
oxr_verify_fixed_size_single_level_path(struct oxr_logger* log,
const char* path,
oxr_verify_fixed_size_single_level_path(struct oxr_logger *log,
const char *path,
uint32_t array_size,
const char* name)
const char *name)
{
if (array_size == 0) {
return oxr_error(log, XR_ERROR_RUNTIME_FAILURE,
@ -98,10 +98,10 @@ oxr_verify_fixed_size_single_level_path(struct oxr_logger* log,
}
extern "C" XrResult
oxr_verify_localized_name(struct oxr_logger* log,
const char* string,
oxr_verify_localized_name(struct oxr_logger *log,
const char *string,
uint32_t array_size,
const char* name)
const char *name)
{
if (array_size == 0) {
return oxr_error(log, XR_ERROR_RUNTIME_FAILURE,
@ -132,9 +132,9 @@ enum class State
};
extern "C" XrResult
oxr_verify_full_path_c(struct oxr_logger* log,
const char* path,
const char* name)
oxr_verify_full_path_c(struct oxr_logger *log,
const char *path,
const char *name)
{
// XR_MAX_PATH_LENGTH is max including null terminator,
// length will not include null terminator
@ -150,10 +150,10 @@ oxr_verify_full_path_c(struct oxr_logger* log,
}
extern "C" XrResult
oxr_verify_full_path(struct oxr_logger* log,
const char* path,
oxr_verify_full_path(struct oxr_logger *log,
const char *path,
size_t length,
const char* name)
const char *name)
{
State state = State::Start;
bool valid = true;
@ -275,11 +275,11 @@ oxr_verify_full_path(struct oxr_logger* log,
*/
static XrResult
subaction_path_no_dups(struct oxr_logger* log,
struct oxr_instance* inst,
struct oxr_sub_paths& sub_paths,
subaction_path_no_dups(struct oxr_logger *log,
struct oxr_instance *inst,
struct oxr_sub_paths &sub_paths,
XrPath path,
const char* variable,
const char *variable,
uint32_t index)
{
bool duplicate = false;
@ -322,7 +322,7 @@ subaction_path_no_dups(struct oxr_logger* log,
sub_paths.gamepad = true;
}
} else {
const char* str = NULL;
const char *str = NULL;
size_t length = 0;
oxr_path_get_string(log, inst, path, &str, &length);
@ -333,7 +333,7 @@ subaction_path_no_dups(struct oxr_logger* log,
}
if (duplicate) {
const char* str = NULL;
const char *str = NULL;
size_t length = 0;
oxr_path_get_string(log, inst, path, &str, &length);
@ -348,11 +348,11 @@ subaction_path_no_dups(struct oxr_logger* log,
extern "C" XrResult
oxr_verify_subaction_paths_create(struct oxr_logger* log,
struct oxr_instance* inst,
oxr_verify_subaction_paths_create(struct oxr_logger *log,
struct oxr_instance *inst,
uint32_t countSubactionPaths,
const XrPath* subactionPaths,
const char* variable)
const XrPath *subactionPaths,
const char *variable)
{
struct oxr_sub_paths sub_paths = {};
@ -370,8 +370,8 @@ oxr_verify_subaction_paths_create(struct oxr_logger* log,
}
extern "C" XrResult
oxr_verify_subaction_path_sync(struct oxr_logger* log,
struct oxr_instance* inst,
oxr_verify_subaction_path_sync(struct oxr_logger *log,
struct oxr_instance *inst,
XrPath path,
uint32_t index)
{
@ -381,7 +381,7 @@ oxr_verify_subaction_path_sync(struct oxr_logger* log,
path == inst->path_cache.gamepad) {
return XR_SUCCESS;
}
const char* str = NULL;
const char *str = NULL;
size_t length = 0;
oxr_path_get_string(log, inst, path, &str, &length);
@ -392,12 +392,12 @@ oxr_verify_subaction_path_sync(struct oxr_logger* log,
}
extern "C" XrResult
oxr_verify_subaction_path_get(struct oxr_logger* log,
struct oxr_instance* inst,
oxr_verify_subaction_path_get(struct oxr_logger *log,
struct oxr_instance *inst,
XrPath path,
const struct oxr_sub_paths* act_sub_paths,
struct oxr_sub_paths* out_sub_paths,
const char* variable)
const struct oxr_sub_paths *act_sub_paths,
struct oxr_sub_paths *out_sub_paths,
const char *variable)
{
struct oxr_sub_paths sub_paths = {};
@ -414,7 +414,7 @@ oxr_verify_subaction_path_get(struct oxr_logger* log,
} else if (path == inst->path_cache.gamepad) {
sub_paths.gamepad = true;
} else {
const char* str = NULL;
const char *str = NULL;
size_t length = 0;
oxr_path_get_string(log, inst, path, &str, &length);
@ -429,7 +429,7 @@ oxr_verify_subaction_path_get(struct oxr_logger* log,
(sub_paths.left && !act_sub_paths->left) ||
(sub_paths.right && !act_sub_paths->right) ||
(sub_paths.gamepad && !act_sub_paths->gamepad)) {
const char* str = NULL;
const char *str = NULL;
size_t length = 0;
oxr_path_get_string(log, inst, path, &str, &length);
@ -453,9 +453,9 @@ oxr_verify_subaction_path_get(struct oxr_logger* log,
*/
extern "C" XrResult
oxr_verify_XrSessionCreateInfo(struct oxr_logger* log,
const struct oxr_instance* inst,
const XrSessionCreateInfo* createInfo)
oxr_verify_XrSessionCreateInfo(struct oxr_logger *log,
const struct oxr_instance *inst,
const XrSessionCreateInfo *createInfo)
{
if (createInfo->type != XR_TYPE_SESSION_CREATE_INFO) {
return oxr_error(log, XR_ERROR_VALIDATION_FAILURE,
@ -473,7 +473,7 @@ oxr_verify_XrSessionCreateInfo(struct oxr_logger* log,
}
#if defined(OXR_HAVE_KHR_opengl_enable) && defined(XR_USE_PLATFORM_XLIB)
XrGraphicsBindingOpenGLXlibKHR const* opengl_xlib =
XrGraphicsBindingOpenGLXlibKHR const *opengl_xlib =
OXR_GET_INPUT_FROM_CHAIN(createInfo,
XR_TYPE_GRAPHICS_BINDING_OPENGL_XLIB_KHR,
XrGraphicsBindingOpenGLXlibKHR);
@ -485,7 +485,7 @@ oxr_verify_XrSessionCreateInfo(struct oxr_logger* log,
#endif // defined(OXR_HAVE_KHR_opengl_enable) && defined(XR_USE_PLATFORM_XLIB)
#ifdef OXR_HAVE_KHR_vulkan_enable
XrGraphicsBindingVulkanKHR const* vulkan = OXR_GET_INPUT_FROM_CHAIN(
XrGraphicsBindingVulkanKHR const *vulkan = OXR_GET_INPUT_FROM_CHAIN(
createInfo, XR_TYPE_GRAPHICS_BINDING_VULKAN_KHR,
XrGraphicsBindingVulkanKHR);
if (vulkan != NULL) {
@ -519,7 +519,7 @@ oxr_verify_XrSessionCreateInfo(struct oxr_logger* log,
extern "C" XrResult
oxr_verify_XrGraphicsBindingOpenGLXlibKHR(
struct oxr_logger* log, const XrGraphicsBindingOpenGLXlibKHR* next)
struct oxr_logger *log, const XrGraphicsBindingOpenGLXlibKHR *next)
{
if (next->type != XR_TYPE_GRAPHICS_BINDING_OPENGL_XLIB_KHR) {
return oxr_error(log, XR_ERROR_VALIDATION_FAILURE,
@ -535,8 +535,8 @@ oxr_verify_XrGraphicsBindingOpenGLXlibKHR(
#ifdef XR_USE_GRAPHICS_API_VULKAN
extern "C" XrResult
oxr_verify_XrGraphicsBindingVulkanKHR(struct oxr_logger* log,
const XrGraphicsBindingVulkanKHR* next)
oxr_verify_XrGraphicsBindingVulkanKHR(struct oxr_logger *log,
const XrGraphicsBindingVulkanKHR *next)
{
if (next->type != XR_TYPE_GRAPHICS_BINDING_VULKAN_KHR) {
return oxr_error(log, XR_ERROR_VALIDATION_FAILURE,