Skip to content

Commit 71ecaa5

Browse files
committed
fix(DeviceFinder): add oculus headset type for rare es07
The Oculus Rift headset can have a rare reported type of es07 which is now being caught and returned correctly. Thanks to @avik-das for identifying the issue.
1 parent 2bb32eb commit 71ecaa5

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

Assets/VRTK/Documentation/API.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7477,6 +7477,7 @@ The Device Finder offers a collection of static methods that can be called to fi
74777477
* `Vive` - A summary of all HTC Vive headset versions.
74787478
* `ViveMV` - A specific version of the HTC Vive headset, the first consumer version.
74797479
* `ViveDVT` - A specific version of the HTC Vive headset, the first consumer version.
7480+
* `OculusRiftES07` - A specific version of the Oculus Rift headset, the rare ES07.
74807481

74817482
### Class Methods
74827483

@@ -7740,7 +7741,7 @@ The ResetHeadsetTypeCache resets the cache holding the current headset type valu
77407741
> `public static Headsets GetHeadsetType(bool summary = false)`
77417742

77427743
* Parameters
7743-
* `bool summary` - If this is true, then the generic name for the headset is returned not including the version type (e.g. OculusRift will be returned for DK2 and CV1).
7744+
* `bool summary` - If this is `true`, then the generic name for the headset is returned not including the version type (e.g. OculusRift will be returned for DK2 and CV1).
77447745
* Returns
77457746
* `Headsets` - The Headset type that is connected.
77467747

Assets/VRTK/Source/Scripts/Utilities/VRTK_DeviceFinder.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,11 @@ public enum Headsets
6060
/// <summary>
6161
/// A specific version of the HTC Vive headset, the first consumer version.
6262
/// </summary>
63-
ViveDVT
63+
ViveDVT,
64+
/// <summary>
65+
/// A specific version of the Oculus Rift headset, the rare ES07.
66+
/// </summary>
67+
OculusRiftES07
6468
}
6569

6670
private static string cachedHeadsetType = "";
@@ -368,7 +372,7 @@ public static void ResetHeadsetTypeCache()
368372
/// <summary>
369373
/// The GetHeadsetType method returns the type of headset connected to the computer.
370374
/// </summary>
371-
/// <param name="summary">If this is true, then the generic name for the headset is returned not including the version type (e.g. OculusRift will be returned for DK2 and CV1).</param>
375+
/// <param name="summary">If this is `true`, then the generic name for the headset is returned not including the version type (e.g. OculusRift will be returned for DK2 and CV1).</param>
372376
/// <returns>The Headset type that is connected.</returns>
373377
public static Headsets GetHeadsetType(bool summary = false)
374378
{
@@ -379,6 +383,9 @@ public static Headsets GetHeadsetType(bool summary = false)
379383
case "oculusriftcv1":
380384
returnValue = (summary ? Headsets.OculusRift : Headsets.OculusRiftCV1);
381385
break;
386+
case "oculusriftes07":
387+
returnValue = (summary ? Headsets.OculusRift : Headsets.OculusRiftES07);
388+
break;
382389
case "vivemv":
383390
returnValue = (summary ? Headsets.Vive : Headsets.ViveMV);
384391
break;

0 commit comments

Comments
 (0)