Skip to content

Commit

Permalink
Added some additional loggign to trace runtimes found from the registry
Browse files Browse the repository at this point in the history
  • Loading branch information
Ybalrid committed Jul 14, 2022
1 parent a8137c8 commit 8941118
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,19 +79,21 @@ private Runtime ReadManifest(string runtimeManifestPath)

private bool GetAvaialbleRuntimesFromRegistry()
{
Debug.Print("Looking for AvailableRuntimes in the registry");
bool hasAppended = false;
RegistryKey openXRv1Key = Registry.LocalMachine.OpenSubKey(GetKhronosOpenXRVersionRegistryKeyPath());
RegistryKey availableRuntimesKey = openXRv1Key?.OpenSubKey("AvailableRuntimes");

if(availableRuntimesKey != null)
{
var availableRuntimes = availableRuntimesKey.GetValueNames();

foreach(string runtimeManifestPath in availableRuntimes)
foreach(string runtimeManifestPath in availableRuntimes)
{
Debug.Print($"Manifest path in registry : {runtimeManifestPath}");
if (availableRuntimesKey.GetValue(runtimeManifestPath).Equals(0))
{
var availableRuntimeManifest = ReadManifest(runtimeManifestPath);
Debug.Print($"Read manifest for {availableRuntimeManifest.Name}");
if (availableRuntimes != null)
{
_availableRuntimes[availableRuntimeManifest.Name] = availableRuntimeManifest;
Expand Down Expand Up @@ -198,7 +200,7 @@ public RuntimeManager()
if(!GetActiveRuntimeFromRegistry())
Debug.WriteLine("Failed to get current runtime");
if(!GetAvaialbleRuntimesFromRegistry())
Debug.Write("Failed to get available runtimes from registry");
Debug.WriteLine("Failed to get available runtimes from registry");

if (!ProbeForSteamVRInstallationPath())
{
Expand Down

0 comments on commit 8941118

Please sign in to comment.