commit f2762840f06b8b6f11496849347d64531b4c5548
parent 8712e38a09d8fac024fb100645abc99bef5186e5
Author: rhunk <101876869+rhunk@users.noreply.github.com>
Date:   Wed, 10 Apr 2024 22:44:06 +0200

fix(app/camera): custom frame rate test

Diffstat:
Mcore/src/main/kotlin/me/rhunk/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 @@ -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()