Files
ProjectEleri/Source/ProjectEleri/System/PlatformInfotFunctionLibrary.cpp

39 lines
1.2 KiB
C++

// Fill out your copyright notice in the Description page of Project Settings.
#include "PlatformInfotFunctionLibrary.h"
#include "PlatformInfotFunctionLibrary.h"
FString UPlatformInfotFunctionLibrary::GetGpuBrandName()
{
#if PLATFORM_WINDOWS
return FWindowsPlatformMisc::GetPrimaryGPUBrand();
#elif PLATFORM_MAC
return FMacPlatformMisc::GetPrimaryGPUBrand();
#else
// IOSPlatformMisc does not implement a GPU brand query, so fall back to the generic
// implementation (which reports a placeholder). Required so this non-void function
// always returns on IOS/Android/Linux.
return FGenericPlatformMisc::GetPrimaryGPUBrand();
#endif
}
FString UPlatformInfotFunctionLibrary::GetCpuBrandName()
{
#if PLATFORM_WINDOWS
return FWindowsPlatformMisc::GetCPUBrand();
#elif PLATFORM_MAC
return FMacPlatformMisc::GetCPUBrand();
#elif PLATFORM_IOS
// On IOS this reports the device/model identifier string (e.g. "iPhone16,1").
return FIOSPlatformMisc::GetCPUBrand();
#else
return FGenericPlatformMisc::GetCPUBrand();
#endif
}
FString UPlatformInfotFunctionLibrary::GetRamAmount()
{
return FString::FromInt(FGenericPlatformMemory::GetPhysicalGBRam());
}