mirror of
https://github.com/SimpleMobileTools/Simple-Camera.git
synced 2025-02-16 19:30:40 +01:00
if force 16:9 ratio is not forced, try taking 4:3
This commit is contained in:
parent
139013bf2d
commit
1c113e5472
@ -324,7 +324,7 @@ public class Preview extends ViewGroup
|
||||
Collections.sort(sizes, new SizesComparator());
|
||||
Camera.Size maxSize = sizes.get(0);
|
||||
for (Camera.Size size : sizes) {
|
||||
final boolean isProperRatio = !mForceAspectRatio || isProperRatio(size);
|
||||
final boolean isProperRatio = isProperRatio(size);
|
||||
final boolean isProperResolution = isProperResolution(size, maxResolution);
|
||||
if (isProperResolution && isProperRatio) {
|
||||
maxSize = size;
|
||||
@ -369,6 +369,7 @@ public class Preview extends ViewGroup
|
||||
float wantedRatio = (float) 3 / 4;
|
||||
if (mForceAspectRatio || mIsVideoMode)
|
||||
wantedRatio = (float) 9 / 16;
|
||||
|
||||
final float diff = Math.abs(currRatio - wantedRatio);
|
||||
return diff < RATIO_TOLERANCE;
|
||||
}
|
||||
|
@ -20,7 +20,7 @@
|
||||
<string name="dark_theme">Dark theme</string>
|
||||
<string name="use_dcim_folder">Store media in the default DCIM folder</string>
|
||||
<string name="focus_before_capture">Refocus before capture</string>
|
||||
<string name="force_ratio">Force 16:9 ratio</string>
|
||||
<string name="force_ratio">Use 16:9 ratio</string>
|
||||
<string name="max_photo_size">Photo resolution limit</string>
|
||||
<string name="max_video_size">Video resolution limit</string>
|
||||
<string name="no_limit">none</string>
|
||||
|
Loading…
x
Reference in New Issue
Block a user