The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

a/util: Add u_file_get_hand_tracking_models_dir

Needed for Windows SteamVR driver

authored by

Moses Turner and committed by
Moses Turner
8b2d62cf 266aec20

+18
+15
src/xrt/auxiliary/util/u_file.c
··· 107 107 // Do not report error. 108 108 return fopen(file_str, mode); 109 109 } 110 + 111 + ssize_t 112 + u_file_get_hand_tracking_models_dir(char *out_path, size_t out_path_size) 113 + { 114 + const char *xdg_data_home = getenv("XDG_DATA_HOME"); 115 + const char *home = getenv("HOME"); 116 + if (xdg_data_home != NULL) { 117 + return snprintf(out_path, out_path_size, "%s/monado/hand-tracking-models/", xdg_data_home); 118 + } else if (home != NULL) { 119 + return snprintf(out_path, out_path_size, "%s/.local/share/monado/hand-tracking-models/", home); 120 + } else { 121 + return -1; 122 + } 123 + } 124 + 110 125 #endif /* XRT_OS_LINUX */ 111 126 112 127 ssize_t
+3
src/xrt/auxiliary/util/u_file.h
··· 29 29 u_file_open_file_in_config_dir(const char *filename, const char *mode); 30 30 31 31 ssize_t 32 + u_file_get_hand_tracking_models_dir(char *out_path, size_t out_path_size); 33 + 34 + ssize_t 32 35 u_file_get_runtime_dir(char *out_path, size_t out_path_size); 33 36 34 37 char *