Skip to content
Snippets Groups Projects
Commit f6069f7a authored by Sebastian Pape's avatar Sebastian Pape
Browse files

Merge branch 'cherry-pick-69b50cf8' into '4.27'

Merge branch 'fix/shipping-vr-launch' into '4.26'

See merge request !23
parents bb7870f7 ab8633ba
No related branches found
No related tags found
1 merge request!23Merge branch 'fix/shipping-vr-launch' into '4.26'
Pipeline #241274 failed
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include "Engine/Engine.h" #include "Engine/Engine.h"
#include "IXRTrackingSystem.h" #include "IXRTrackingSystem.h"
#include "IHeadMountedDisplay.h" #include "IHeadMountedDisplay.h"
#include "AudioDevice.h"
bool UVirtualRealityUtilities::IsDesktopMode() bool UVirtualRealityUtilities::IsDesktopMode()
{ {
...@@ -30,7 +31,9 @@ bool UVirtualRealityUtilities::IsRoomMountedMode() ...@@ -30,7 +31,9 @@ bool UVirtualRealityUtilities::IsRoomMountedMode()
bool UVirtualRealityUtilities::IsHeadMountedMode() bool UVirtualRealityUtilities::IsHeadMountedMode()
{ {
return GEngine->XRSystem.IsValid() && GEngine->XRSystem->IsHeadTrackingAllowed(); // In editor builds: checks for EdEngine->IsVRPreviewActive()
// In packaged builds: checks for `-vr` in commandline or bStartInVR in UGeneralProjectSettings
return FAudioDevice::CanUseVRAudioDevice();
} }
bool UVirtualRealityUtilities::IsCave() bool UVirtualRealityUtilities::IsCave()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment