| 1243 | } |
| 1244 | |
| 1245 | OVR_PUBLIC_FUNCTION(const char*) ovr_GetString(ovrSession session, const char* propertyName, const char* defaultVal) |
| 1246 | { |
| 1247 | REV_TRACE(ovr_GetString); |
| 1248 | |
| 1249 | if (!session) |
| 1250 | return defaultVal; |
| 1251 | |
| 1252 | // Override defaults, we should always return a valid value for these |
| 1253 | if (strcmp(propertyName, OVR_KEY_GENDER) == 0) |
| 1254 | defaultVal = OVR_DEFAULT_GENDER; |
| 1255 | |
| 1256 | if (session) |
| 1257 | { |
| 1258 | vr::EVRSettingsError error = vr::VRSettingsError_None; |
| 1259 | vr::VRSettings()->GetString(session->AppKey, propertyName, session->StringBuffer, sizeof(session->StringBuffer), &error); |
| 1260 | if (error != vr::VRSettingsError_None) |
| 1261 | return session->StringBuffer; |
| 1262 | } |
| 1263 | return defaultVal; |
| 1264 | } |
| 1265 | |
| 1266 | OVR_PUBLIC_FUNCTION(ovrBool) ovr_SetString(ovrSession session, const char* propertyName, const char* value) |
| 1267 | { |
nothing calls this directly
no outgoing calls
no test coverage detected