MCPcopy Create free account
hub / github.com/LibreVR/Revive / ovr_SetFloatArray

Function ovr_SetFloatArray

Revive/REV_CAPI.cpp:1226–1243  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1224}
1225
1226OVR_PUBLIC_FUNCTION(ovrBool) ovr_SetFloatArray(ovrSession session, const char* propertyName, const float values[], unsigned int valuesSize)
1227{
1228 REV_TRACE(ovr_SetFloatArray);
1229
1230 if (!session)
1231 return false;
1232
1233 char key[vr::k_unMaxSettingsKeyLength] = { 0 };
1234 for (unsigned int i = 0; i < valuesSize; i++)
1235 {
1236 vr::EVRSettingsError error = vr::VRSettingsError_None;
1237 sprintf_s(key, "%s[%d]", propertyName, i);
1238 vr::VRSettings()->SetFloat(session->AppKey, key, values[i], &error);
1239 if (error != vr::VRSettingsError_None)
1240 return false;
1241 }
1242 return true;
1243}
1244
1245OVR_PUBLIC_FUNCTION(const char*) ovr_GetString(ovrSession session, const char* propertyName, const char* defaultVal)
1246{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected