Code Monkey home page Code Monkey logo

Comments (13)

rom1v avatar rom1v commented on May 16, 2024 4

As a workaround:

# disable auto rotation
adb shell settings put system accelerometer_rotation 0
# use custom rotation (0=portrait, 1=landscape)
adb shell settings put system user_rotation 1

#284 (comment)

from scrcpy.

rom1v avatar rom1v commented on May 16, 2024 4

I just implemented it on branch rotatedevice (eb0f339).

Just press Ctrl+r (or Cmd+r on macOS) to rotate the device.

Feedbacks welcome :)

from scrcpy.

rom1v avatar rom1v commented on May 16, 2024 2

It is probably not very difficult, but it is quite intrusive (we need to check everywhere the current rotation to reverse width and height).

It's in my (virtual) todo list when I have time (maybe after the "device screen off" while mirroring).

from scrcpy.

srevinsaju avatar srevinsaju commented on May 16, 2024 1

from scrcpy.

r4dixx avatar r4dixx commented on May 16, 2024 1

Tested on Pixel 2 and Pixel 4 - Android 10, from macOS Catalina.
Works perfectly! Thanks

from scrcpy.

npes87184 avatar npes87184 commented on May 16, 2024

Reference #218

from scrcpy.

ChristopherKrohn avatar ChristopherKrohn commented on May 16, 2024

Is there a way to put the monitor in landscape while the camera is showing?
I tried the above commands both while scrcpy was active in terminal, and when it was not, and nothing happened when I executed the commands.

Am I missing something, or is the monitor simply not willing to be in landscape while the camera app is open?

from scrcpy.

rom1v avatar rom1v commented on May 16, 2024

Some camera apps keep the device in landscape mode (and rotate their icons manually when the device is rotated). This avoids a glitch due to the portrait/landscape switch.

The "solution" is to implement a (manual) client-side rotation in scrcpy.

from scrcpy.

ChristopherKrohn avatar ChristopherKrohn commented on May 16, 2024

Aha, that makes sense! Thanks for the fast response!

Is there a simple way of implementing this, or is this something I should just leave be?
I'm just wondering if it is possible to rotate the mirror shown on my desktop some way.

I have absolutely no experience with this though.

from scrcpy.

ChristopherKrohn avatar ChristopherKrohn commented on May 16, 2024

Alright! Thanks!

In the meantime I'll just use another app that rotates with the screen.
Open Camera worked really well, for other users having the same issue.

Thanks again!

from scrcpy.

agsola avatar agsola commented on May 16, 2024

This would be great to be implemented in next release.

Appart from this it has everything needed to work daily with it.

from scrcpy.

hunterx9 avatar hunterx9 commented on May 16, 2024

i added shortcut key for screen rotation
here's the code:
https://files.catbox.moe/c8lz87.c
Place input_manager.c inside project-> app--src folder and build it using
ninja -Cx
./run x

Ctrl+q = Change screen density to 200
Ctrl+w = Reset screen density
Ctrl+e = landscape mode
Ctrl+r = portrait mode

try this first in adb if rotation doesnt work
adb shell settings put system accelerometer_rotation 0

from scrcpy.

rom1v avatar rom1v commented on May 16, 2024

Merged in dev.

from scrcpy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.