-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
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
Add the VirtualDisplay method to fix the SurfaceControl API changes. #4657
Conversation
Use DisplayManager to create VirtualDisplay object replace origin SurfaceControl method Add the MediaProjectionGlobal workaround for some transitional version Android ROM.
Awesome, thank you very much! ❤️ I made some changes, the main one is to try the
(Btw, do you know how to support cropping and capture orientation with this new method?) And I removed the
Branch For users looking for a fix, use v2.4 or higher.
oldAnd old version which did not use the configureddisplayId (it always used 0):
Review and feedbacks welcome. |
Thank you @DerekWuYD it works! |
@rom1v Thanks for your review and optimize. |
Unfortunately, I'm not sure how to support the cropping and orientation with the VirutalDisplay class. |
Merged into |
This works for me, thank you! |
Android 14 incorrect capture fixed at 7e3b935 |
scrcpy v2.4 Changes since v2.3.1: - Add UHID keyboard and mouse support (Genymobile#4473) - Simulate tilt multitouch by pressing Shift (Genymobile#4529) - Add rotation support for non-default display (Genymobile#4698) - Improve audio player (Genymobile#4572) - Adapt to display API changes in Android 15 (Genymobile#4646, Genymobile#4656, Genymobile#4657) - Adapt audio workarounds to Android 14 (Genymobile#4492) - Fix clipboard for IQOO devices on Android 14 (Genymobile#4492, Genymobile#4589, Genymobile#4703) - Fix integer overflow for audio packet duration (Genymobile#4536) - Rework cleanup (Genymobile#4649) - Upgrade FFmpeg to 6.1.1 in Windows releases (Genymobile#4713) - Upgrade libusb to 1.0.27 in Windows releases (Genymobile#4713) - Various technical fixes
#4646
Use DisplayManager to create VirtualDisplay object replace origin SurfaceControl method.
Add the MediaProjectionGlobal workaround for some transitional version Android ROM.