Skip to content

Commit

Permalink
fix(app/camera): custom frame rate test
Browse files Browse the repository at this point in the history
  • Loading branch information
rhunk committed Apr 10, 2024
1 parent 8712e38 commit f276284
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit f276284

Please sign in to comment.