Files
UnrealEngineUWP/Engine/Source/Runtime/HeadMountedDisplay/Private/HeadMountedDisplayVulkanExtensions.cpp
ryan durand 0f0464a30e Updating copyright for Engine Runtime.
#rnx
#rb none


#ROBOMERGE-OWNER: ryan.durand
#ROBOMERGE-AUTHOR: ryan.durand
#ROBOMERGE-SOURCE: CL 10869210 via CL 10869511 via CL 10869900
#ROBOMERGE-BOT: (v613-10869866)

[CL 10870549 by ryan durand in Main branch]
2019-12-26 14:45:42 -05:00

14 lines
895 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "IHeadMountedDisplayVulkanExtensions.h"
#include "GeneralProjectSettings.h"
#include "Misc/CommandLine.h"
bool IHeadMountedDisplayVulkanExtensions::ShouldDisableVulkanVSync() const
{
// This can be called while setting up a vulkan swap chain for the PreLoadScreenManager but we cannot easily inspect bStartInVR then because the object has not been loaded (it being PreLoad).
// For now we are just going to return false here and avoid an assert when trying to GetDefault. This might break VR rendering of PreLoadScreens... but there is a good chance it is already broken.
// We check for the class being loaded first so that -vr behavior is consistent with bStartInVR.
return IsClassLoaded<UGeneralProjectSettings>() && (FParse::Param(FCommandLine::Get(), TEXT("vr")) || GetDefault<UGeneralProjectSettings>()->bStartInVR);
}