diff --git a/ZXing.Net.Mobile/Android/CameraAccess/CameraController.android.cs b/ZXing.Net.Mobile/Android/CameraAccess/CameraController.android.cs index 484be6074..ddcb7f713 100644 --- a/ZXing.Net.Mobile/Android/CameraAccess/CameraController.android.cs +++ b/ZXing.Net.Mobile/Android/CameraAccess/CameraController.android.cs @@ -242,12 +242,11 @@ void ApplyCameraSettings() var selectedFps = parameters.SupportedPreviewFpsRange.FirstOrDefault(); if (selectedFps != null) { - // This will make sure we select a range with the lowest minimum FPS - // and maximum FPS which still has the lowest minimum - // This should help maximize performance / support for hardware + // This will make sure we select a range with the highest maximum fps + // which still has the lowest minimum fps (Widest Range) foreach (var fpsRange in parameters.SupportedPreviewFpsRange) { - if (fpsRange[0] <= selectedFps[0] && fpsRange[1] > selectedFps[1]) + if (fpsRange[1] > selectedFps[1] || fpsRange[1] == selectedFps[1] && fpsRange[0] < selectedFps[0]) selectedFps = fpsRange; } parameters.SetPreviewFpsRange(selectedFps[0], selectedFps[1]);