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

Function GetOculusBasePath

ReviveOverlay/revivemanifestcontroller.cpp:184–204  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

182}
183
184bool GetOculusBasePath(wchar_t* path, uint32_t length)
185{
186 LONG error = ERROR_SUCCESS;
187
188 HKEY oculusKey;
189 error = RegOpenKeyEx(HKEY_LOCAL_MACHINE, L"Software\\Oculus VR, LLC\\Oculus", 0, KEY_READ | KEY_WOW64_32KEY, &oculusKey);
190 if (error != ERROR_SUCCESS)
191 {
192 qDebug("Unable to open Oculus key.");
193 return false;
194 }
195 error = RegQueryValueEx(oculusKey, L"Base", NULL, NULL, (PBYTE)path, (PDWORD)&length);
196 if (error != ERROR_SUCCESS)
197 {
198 qDebug("Unable to read Base path.");
199 return false;
200 }
201 RegCloseKey(oculusKey);
202
203 return true;
204}
205
206CReviveManifestController::CReviveManifestController()
207 : BaseClass()

Callers 1

InitMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected