Skip to content

Commit

Permalink
Fix pip-mode aspect ratio is too extreme.
Browse files Browse the repository at this point in the history
  • Loading branch information
oxyroid committed Jul 21, 2024
1 parent 3d775d8 commit ae32a4a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion core/src/main/java/com/m3u/core/util/basic/Graphics.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,8 @@ import android.util.Rational

val Rect.isNotEmpty: Boolean get() = !isEmpty

val Rect.rational: Rational get() = Rational(width(), height())
val Rect.rational: Rational
get() = Rational(width(), height()).coerceIn(
Rational(100, 239),
Rational(239, 100)
)

0 comments on commit ae32a4a

Please sign in to comment.