Skip to content
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 --no-auto-resize option (patch included) #5864

Open
krzvq opened this issue Feb 20, 2025 · 3 comments
Open

Add --no-auto-resize option (patch included) #5864

krzvq opened this issue Feb 20, 2025 · 3 comments

Comments

@krzvq
Copy link

krzvq commented Feb 20, 2025

I use an app which mostly runs in landscape mode but occasionally briefly switches to portrait mode and back. scrpy auto-resizes during this but does not keep the original window position so the scrpcpy window gradually migrates across the screen.
I have include a patch against scrcpy-3.1 that adds a "--no-auto-resize" option to avoid this. I'm hoping you'll consider adding it to the main release.

scrcpy-3.1-auto-resize-patch.txt

@rom1v
Copy link
Collaborator

rom1v commented Feb 20, 2025

Hi,

Note that a workaround for your specific use case could be to lock the orientation with --capture-orientation=@: https://github.com/Genymobile/scrcpy/blob/master/doc/video.md#orientation

That being said, a new option --no-auto-resize makes sense. I added it to my TODO list to review/merge (I'm busy on other things currently).

On GitHub, you should open a PR instead of posting a patch. At least, please indicate your "author string" (e.g. krzvq <[email protected]>, feel free to replace krzvq by your first name and name).

@krzvq
Copy link
Author

krzvq commented Feb 20, 2025

I'm not familiar with how things are done on GitHub so wasn't aware a PR was the preferred method. Will do that.

I tried --capture-orientation before - it partially works in that while the scrpy window still rotates it's at least between two fixed positions. However if the window is too close to the edge of the screen at startup then it will move position on the first rotation to accommodate both orientations appearing fully on screen so it still ends up out of the position where I want it to be. That may be down to the window manager, rather than scrcpy, but just getting scrcpy to resize the content to the window instead of the other way around is a cleaner solution for my use case and seems to me to be something that would be useful in wider use cases too.

@rom1v
Copy link
Collaborator

rom1v commented Feb 21, 2025

it partially works in that while the scrpy window still rotates it's at least between two fixed positions

Not if the orientation is locked with a @.

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