From bcbbd533a3254bc13a8b0cca54fe30a506b294cb Mon Sep 17 00:00:00 2001 From: Adnan Mujkic Date: Sat, 26 Sep 2026 22:53:58 +0200 Subject: [PATCH] Some settings for mac and trying out scalability settings --- Config/DefaultSalability.ini | 3 + Config/IOS/IOSEngine.ini | 69 +++++++++++++++++++ .../DirectiveUtilities.uplugin | 6 +- .../StevesUEHelpers/StevesUEHelpers.uplugin | 3 +- .../System/PlatformInfotFunctionLibrary.cpp | 10 +++ 5 files changed, 88 insertions(+), 3 deletions(-) create mode 100644 Config/DefaultSalability.ini create mode 100644 Config/IOS/IOSEngine.ini diff --git a/Config/DefaultSalability.ini b/Config/DefaultSalability.ini new file mode 100644 index 00000000..d5f29ddd --- /dev/null +++ b/Config/DefaultSalability.ini @@ -0,0 +1,3 @@ + +[ShadowQuality@0] +r.ShadowQuality=1 \ No newline at end of file diff --git a/Config/IOS/IOSEngine.ini b/Config/IOS/IOSEngine.ini new file mode 100644 index 00000000..2bc1dbf3 --- /dev/null +++ b/Config/IOS/IOSEngine.ini @@ -0,0 +1,69 @@ +; ============================================================================= +; ProjectEleri - IOS platform engine config +; ============================================================================= +; Layered on top of Config/DefaultEngine.ini for the IOS target platform ONLY +; (config hierarchy pattern /Config//Engine.ini, +; see UBT ConfigHierarchy.cs and FConfigCacheIni), so nothing in this file +; changes PC / Mac / Android behaviour. +; +; Purpose: benchmarking. Unreal's IOS defaults lock the game to 30 FPS and to +; the display's vertical sync; this file removes both. +; +; NOTE: the editor's Project Settings -> Platforms -> iOS panel is evaluated on +; the *host* platform (Mac) and therefore does not read this file - it will +; still display the engine defaults ("30 FPS", "Use VSync"). The values below +; are what the packaged IOS build actually uses. +; +; To revert: delete this file (or comment out the entries below). +; ============================================================================= + +[/Script/IOSRuntimeSettings.IOSRuntimeSettings] +; --- the 30 FPS lock -------------------------------------------------------- +; Engine default is PUFRL_30 (Engine/Config/BaseEngine.ini + IOSRuntimeSettings +; ctor). That value is consumed twice: +; * FIOSPlatformRHIFramePacer::IsEnabled() computes +; FrameInterval = GetMaxRefreshRate() / FrameRateLock = 60 / 30 = 2 +; and runs its CADisplayLink at 60/2 = 30 Hz, which gates every rendered +; frame -> a hard 30 FPS ceiling on device. +; * FMetalDevice::FMetalDevice() stores it into GMetalPresentFramePacing, +; which is used by presentDrawableAfterMinimumDuration(). +; PUFRL_None parses to 0, so the pacer runs at the full refresh rate instead. +FrameRateLock=PUFRL_None + +; FIOSPlatformRHIFramePacer::GetMaxRefreshRate() returns a hard-coded 60 unless +; this is True; with it enabled it returns [UIScreen mainScreen] +; .maximumFramesPerSecond, i.e. the real panel rate (120Hz on ProMotion devices). +; Required to benchmark above 60 FPS. +bEnableDynamicMaxFPS=True + +; Emits CADisableMinimumFrameDurationOnPhone into the Info.plist +; generated by UEDeployIOS. Without that key iOS clamps the app to 60Hz even when +; the frame pacer is allowed to go higher. It is a build-time value: rebuild the +; IOS target with UBT so Build/IOS/UBTGenerated/Info.Template.plist is regenerated +; (it is consumed by BUILD/BuildIOS.sh when xcodebuild builds the .app). +bSupportHighRefreshRates=True + +[/Script/Engine.Engine] +; --- no frame rate smoothing ------------------------------------------------ +; Frame rate smoothing is the only thing that applies SmoothedFrameRateRange +; (Config/DefaultEngine.ini currently has UpperBound=200). Engine/Config/ +; BaseEngine.ini already ships bSmoothFrameRate=false, so this is belt and +; braces: it keeps the IOS frame rate uncapped even if the "Smooth Frame Rate" +; project setting is ever switched on in the editor, which would otherwise +; re-introduce a ceiling behind a setting that does not look IOS specific. +bSmoothFrameRate=False + +[SystemSettings] +; --- no vsync --------------------------------------------------------------- +; Unreal derives bLockToVsync from this CVar (Runtime/Engine/Private/ +; UnrealClient.cpp), which on Metal becomes CAMetalLayer.displaySyncEnabled: +; with the game running fullscreen, 0 => false => presents never wait for the +; display. It also stops the IOS frame pacer from re-tuning the CADisplayLink +; interval from rhi.SyncInterval (Engine/Config/Android/AndroidEngine.ini uses +; the same key, [ConsoleVariables] r.VSync=1, for the opposite reason). +r.VSync=0 + +; --- no FPS cap ------------------------------------------------------------- +; t.MaxFPS <= 0 means uncapped (Runtime/Engine/Private/UnrealEngine.cpp, default +; is already 0 - set explicitly so no stray value can re-introduce a cap). +t.MaxFPS=0 diff --git a/Plugins/DirectiveUtilities/DirectiveUtilities.uplugin b/Plugins/DirectiveUtilities/DirectiveUtilities.uplugin index aa717178..2837e541 100644 --- a/Plugins/DirectiveUtilities/DirectiveUtilities.uplugin +++ b/Plugins/DirectiveUtilities/DirectiveUtilities.uplugin @@ -18,7 +18,8 @@ "SupportedTargetPlatforms": [ "Win64", "Mac", - "Linux" + "Linux", + "IOS" ], "Modules": [ { @@ -28,7 +29,8 @@ "PlatformAllowList": [ "Win64", "Mac", - "Linux" + "Linux", + "IOS" ] }, { diff --git a/Plugins/StevesUEHelpers/StevesUEHelpers.uplugin b/Plugins/StevesUEHelpers/StevesUEHelpers.uplugin index 8bbc7900..2d7b0afc 100644 --- a/Plugins/StevesUEHelpers/StevesUEHelpers.uplugin +++ b/Plugins/StevesUEHelpers/StevesUEHelpers.uplugin @@ -21,7 +21,8 @@ "PlatformAllowList": [ "Win64", "Linux", - "Mac" + "Mac", + "IOS" ] }, { diff --git a/Source/ProjectEleri/System/PlatformInfotFunctionLibrary.cpp b/Source/ProjectEleri/System/PlatformInfotFunctionLibrary.cpp index f7ded1c9..12c01ebf 100644 --- a/Source/ProjectEleri/System/PlatformInfotFunctionLibrary.cpp +++ b/Source/ProjectEleri/System/PlatformInfotFunctionLibrary.cpp @@ -10,6 +10,11 @@ FString UPlatformInfotFunctionLibrary::GetGpuBrandName() 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 } @@ -19,6 +24,11 @@ FString UPlatformInfotFunctionLibrary::GetCpuBrandName() 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 }