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

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

Altering way of detecting IsHeadMountedMode()

See merge request !18

(cherry picked from commit 69b50cf8)

1ea2dc24 Altering way of detecting IsHeadMountedMode()
parent bb7870f7
Branches
Tags
1 merge request!23Merge branch 'fix/shipping-vr-launch' into '4.26'
......@@ -13,6 +13,7 @@
#include "Engine/Engine.h"
#include "IXRTrackingSystem.h"
#include "IHeadMountedDisplay.h"
#include "AudioDevice.h"
bool UVirtualRealityUtilities::IsDesktopMode()
{
......@@ -30,7 +31,9 @@ bool UVirtualRealityUtilities::IsRoomMountedMode()
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()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment