Skip to content

Commit

Permalink
Fix .zero to 1.0 ensure minimal operation through the scale factor.
Browse files Browse the repository at this point in the history
  • Loading branch information
hyun99999 committed Oct 18, 2023
1 parent 1703b4d commit b2ff6d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/Impl/Coordinates.swift
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ private func getDisplayScale() -> CGFloat {
#if os(iOS) || os(tvOS)
if #available(iOS 13.0, tvOS 13.0, *) {
let windowScene = UIApplication.shared.connectedScenes.first as? UIWindowScene
return windowScene?.screen.scale ?? .zero
return windowScene?.screen.scale ?? 1.0
} else {
return UIScreen.main.scale
}
Expand Down

0 comments on commit b2ff6d5

Please sign in to comment.