2022-05-23 18:41:30 +00:00
|
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
|
|
|
|
#include "LyraPerformanceSettings.h"
|
2022-09-13 07:18:28 +00:00
|
|
|
|
2022-05-23 18:41:30 +00:00
|
|
|
#include "Engine/PlatformSettings.h"
|
2022-09-13 07:18:28 +00:00
|
|
|
#include "Engine/PlatformSettingsManager.h"
|
|
|
|
#include "Misc/AssertionMacros.h"
|
|
|
|
#include "Misc/EnumRange.h"
|
|
|
|
#include "UObject/NameTypes.h"
|
2022-05-23 18:41:30 +00:00
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
ULyraPlatformSpecificRenderingSettings::ULyraPlatformSpecificRenderingSettings()
|
|
|
|
{
|
|
|
|
MobileFrameRateLimits.Append({ 20, 30, 45, 60, 90, 120 });
|
|
|
|
}
|
|
|
|
|
|
|
|
const ULyraPlatformSpecificRenderingSettings* ULyraPlatformSpecificRenderingSettings::Get()
|
|
|
|
{
|
|
|
|
ULyraPlatformSpecificRenderingSettings* Result = UPlatformSettingsManager::Get().GetSettingsForPlatform<ThisClass>();
|
|
|
|
check(Result);
|
|
|
|
return Result;
|
|
|
|
}
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
ULyraPerformanceSettings::ULyraPerformanceSettings()
|
|
|
|
{
|
|
|
|
PerPlatformSettings.Initialize(ULyraPlatformSpecificRenderingSettings::StaticClass());
|
|
|
|
|
|
|
|
CategoryName = TEXT("Game");
|
|
|
|
|
|
|
|
DesktopFrameRateLimits.Append({ 30, 60, 120, 144, 160, 165, 180, 200, 240, 360 });
|
|
|
|
|
|
|
|
// Default to all stats are allowed
|
|
|
|
FLyraPerformanceStatGroup& StatGroup = UserFacingPerformanceStats.AddDefaulted_GetRef();
|
|
|
|
for (ELyraDisplayablePerformanceStat PerfStat : TEnumRange<ELyraDisplayablePerformanceStat>())
|
|
|
|
{
|
|
|
|
StatGroup.AllowedStats.Add(PerfStat);
|
|
|
|
}
|
|
|
|
}
|