Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cc5d6d5d authored by Mark Harman's avatar Mark Harman
Browse files

Avoid duplicate first zoom_ratio with min zoom less than 1x.

parent 5d79a206
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -2599,8 +2599,11 @@ public class CameraController2 extends CameraController {
                for(int i=0;i<n_steps_below_one-1;i++) {
                    zoom *= scale_factor;
                    int zoom_ratio = (int)(zoom*100);
                    if( zoom_ratio > camera_features.zoom_ratios.get(0) ) {
                        // on some devices (e.g., Pixel 6 Pro), the second entry would equal the first entry, due to the rounding fix above
                        camera_features.zoom_ratios.add(zoom_ratio);
                    }
                }

                // add values for 1.0f
                zoom_value_1x = camera_features.zoom_ratios.size();