Skip to content

Window when the phone is rotated doesn't scale and clicking doesn't work on Android 16 #5881

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
corentin-c opened this issue Feb 27, 2025 · 6 comments

Comments

@corentin-c
Copy link

corentin-c commented Feb 27, 2025

Environment

  • OS: [macOS]
  • Scrcpy version: [3.1]
  • Installation method: [brew]
  • Device model: [M4 pro]
  • Android version: [16 beta 2] Pixel 6 pro

Describe the bug

Might be a duplicate of #5853 but i'm not sure

When rotating the screen of the phone the window on my mac doesn't scale to landscape, and trying to click on the screen seems to behave like nothing rotated. The terminal says Android 15 but i've checked and it's backlava. It doesn't show any sign of rotation

Android 16 :

scrcpy -S
scrcpy 3.1 https://github.com/Genymobile/scrcpy
INFO: ADB device found:
INFO: --> (usb) 22091FDEE0000F device Pixel_6_Pro
/opt/homebrew/Cellar/scrcpy/3.1/share/scrcpy/scrcpy-server: 1 file pushed, 0 skipped. 135.2 MB/s (90640 bytes in 0.001s)
[server] INFO: Device: [Google] google Pixel 6 Pro (Android 15)
INFO: Renderer: metal
INFO: Texture: 1440x3120
[server] INFO: Device display turned off

Image

Before when it was working :

scrcpy -S
scrcpy 3.1 https://github.com/Genymobile/scrcpy
INFO: ADB device found:
INFO: --> (usb) 8206e76b device M2007J17G
/opt/homebrew/Cellar/scrcpy/3.1/share/scrcpy/scrcpy-server: 1 file pushed, 0 skipped. 135.3 MB/s (90640 bytes in 0.001s)
[server] INFO: Device: [Xiaomi] Xiaomi M2007J17G (Android 12)
INFO: Renderer: metal
INFO: Texture: 1080x2400
[server] INFO: Device display turned off
[server] INFO: Retrying with -m1920...
[server] ERROR: Capture/encoding error: android.media.MediaCodec$CodecException: Error 0xfffffff4
INFO: Texture: 864x1920
INFO: Texture: 1920x864

Image
@corentin-c
Copy link
Author

manually requesting rotation doesn't change anything

@rom1v
Copy link
Collaborator

rom1v commented Feb 27, 2025

On your first screenshot, it seems there are black padding on your device on top and bottom, and scrcpy adds left and right padding to keep the portrait aspect ratio (it doesn't care that the content of your screen is black on top and bottom).

@corentin-c
Copy link
Author

Yes, put before android 16, the phone was doing like the screenshot at the bottom and the window on my mac was scaling properly, also clicking on the window in landscape mode was working

@rom1v
Copy link
Collaborator

rom1v commented Feb 27, 2025

Refs #5415 e26bdb0

@rom1v
Copy link
Collaborator

rom1v commented Mar 7, 2025

See #5908.

@corentin-c
Copy link
Author

Confirmed working on Pixel 9 Android 16 and Pixel 6 pro Android 16 thank you for quick the fix @rom1v !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants