Closed lcksk closed 1 year ago
I've tried a few more phones and each has this problem -(
Hi,
I will have a look when I have time.
I will have a look when I have time.
Thanks for your attention. Just now, I took a moment to debug a bit and found that if the first parameter of setMVPMatrixAndViewPort() is forced to 90 degrees, the behavior is normal. Since I don't know much about gles, I can't submit a valid PR, so if you have time, you can see if there is a perfect solution.
private fun initOrUpdateSurfaceTexture(surface: Surface) {
eglSurface = ensureGlContext(EGlSurface(surface)) {
val width = it.getWidth()
val height = it.getHeight()
fullFrameRect = FullFrameRect(Texture2DProgram()).apply {
textureId = createTextureObject()
setMVPMatrixAndViewPort(
90fps,
Size(width, height)
)
}
Hi,
Thanks for the hint :)
Somehow, the screen recorder frame is always oriented in portrait.
I have made a fix in the main
branch. Could you test it?
Yes, using main branch to confirm the issures is gone.
screenrecorder 1:
If the initial state of the demo is portrait mode, sink display is normal. Then the display on the sink side is normal. then, if the mobile phone is switched between horizontal and vertical ,it just work well.
screenrecorder 2:
If the initial state of the phone is horizontal, the display screen is stretched. Before clicking the "record screen" button, keep the phone in landscape mode, and then click "record screen"
The screen displayed on the sink is stretched, and later, if the mobile phone switches between horizontal and vertical mode, the picture is also distorted