< Summary

Class:DCL.SettingsCommon.SettingsControllers.SpecificControllers.FPSLimitControlController
Assembly:SettingsControllers
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/Settings/SettingsControllers/SpecificControllers/FPSLimitControlController.cs
Covered lines:4
Uncovered lines:1
Coverable lines:5
Total lines:26
Line coverage:80% (4 of 5)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
GetStoredValue()0%110100%
UpdateSetting(...)0%110100%
ToggleFPSCap(...)0%2100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/Controllers/Settings/SettingsControllers/SpecificControllers/FPSLimitControlController.cs

#LineLine coverage
 1using DCL.SettingsCommon.SettingsControllers.BaseControllers;
 2using UnityEngine;
 3#if UNITY_WEBGL && !UNITY_EDITOR
 4using System.Runtime.InteropServices;
 5#endif
 6
 7namespace DCL.SettingsCommon.SettingsControllers.SpecificControllers
 8{
 9    [CreateAssetMenu(menuName = "Settings/Controllers/Controls/FPS Limit", fileName = "FPSLimitControlController")]
 10    public class FPSLimitControlController : ToggleSettingsControlController
 11    {
 212        public override object GetStoredValue() { return currentQualitySetting.fpsCap; }
 13
 14        public override void UpdateSetting(object newValue)
 15        {
 216            currentQualitySetting.fpsCap = (bool)newValue;
 217            ToggleFPSCap(currentQualitySetting.fpsCap);
 218        }
 19
 20#if UNITY_WEBGL && !UNITY_EDITOR
 21        [DllImport("__Internal")] public static extern void ToggleFPSCap(bool useFPSCap);
 22#else
 023        public static void ToggleFPSCap(bool useFPSCap) { }
 24#endif
 25    }
 26}