Android support, attempt-1 #8

Open
kornerr wants to merge 62 commits from and1 into master
pull from: and1
2 changed files with 10 additions and 0 deletions
Showing only changes of commit 3f94adf13a - Show all commits

No files matched your search

+8
View File
@@ -0,0 +1,8 @@
import UIKit
func renderPixelSize(_ view: UIView) -> [Int32] {
let scale = view.contentScaleFactor
let w = Int32(max(1, (view.bounds.width * scale).rounded()))
let h = Int32(max(1, (view.bounds.height * scale).rounded()))
return [w, h]
}
@@ -23,6 +23,8 @@ final class RenderGLView: UIView {
override func layoutSubviews() { override func layoutSubviews() {
super.layoutSubviews() super.layoutSubviews()
let ps = renderPixelSize(self)
renderSet(F.reshapePixelSize, ps)
} }
} }