From f2762840f06b8b6f11496849347d64531b4c5548 Mon Sep 17 00:00:00 2001 From: rhunk <101876869+rhunk@users.noreply.github.com> Date: Wed, 10 Apr 2024 22:44:06 +0200 Subject: [PATCH] fix(app/camera): custom frame rate test --- .../snapenhance/core/features/impl/tweaks/CameraTweaks.kt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/core/src/main/kotlin/me/rhunk/snapenhance/core/features/impl/tweaks/CameraTweaks.kt b/core/src/main/kotlin/me/rhunk/snapenhance/core/features/impl/tweaks/CameraTweaks.kt index 30e18e971..7e604206b 100644 --- a/core/src/main/kotlin/me/rhunk/snapenhance/core/features/impl/tweaks/CameraTweaks.kt +++ b/core/src/main/kotlin/me/rhunk/snapenhance/core/features/impl/tweaks/CameraTweaks.kt @@ -94,10 +94,8 @@ class CameraTweaks : Feature("Camera Tweaks", loadParams = FeatureLoadParams.ACT val customFrameRate = (if (isFrontCamera) config.frontCustomFrameRate.getNullable() else config.backCustomFrameRate.getNullable())?.toIntOrNull() ?: return@hook val fpsRanges = param.getResult() as? Array<*> ?: return@hook - if (customFrameRate <= 30) { - param.setResult(arrayOf(Range(customFrameRate, customFrameRate))) - return@hook - } + param.setResult(arrayOf(Range(customFrameRate, customFrameRate))) + if (customFrameRate <= 30) return@hook val closestMaxFps = fpsRanges.mapNotNull { (it as? Range<*>)?.upper?.toString()?.toIntOrNull()