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

Square device wants to be hip #1702

Open
2 tasks done
icantremember opened this issue Aug 24, 2020 · 6 comments
Open
2 tasks done

Square device wants to be hip #1702

icantremember opened this issue Aug 24, 2020 · 6 comments

Comments

@icantremember
Copy link

  • I have read the FAQ.
  • I have searched in existing issues.

Environment

  • OS: [e.g. Debian, Windows, macOS...]
    Windows 10 Pro
  • scrcpy version: [e.g. 1.12.1]
    version 1.16
  • installation method: [e.g. manual build, apt, snap, brew, Windows release...]
    Windows zip
  • device model:
    Unihertz Titan
  • Android version: [e.g. 10]
    9

Describe the bug
When connecting scrcpy to my Titan (phone with square screen and physical keyboard) it seems to want the device to be a different resolution than it is, which makes interacting with the device in the scrcpy window impossible. Running scrcpy results in a window with large black bars on the top and bottom of the screen. Mouse shortcuts (middle click for Home, right-click for Back) and most keyboard shortcuts work fine, but mouse left-click interactions send errors to the console.

  • The phone appears to report the correct size:
PS C:\Android\scrcpy> ./adb shell wm size
Physical size: 1432x1436
  • scrcpy appears to want to make it a portrait device, which is what the resulting window looks like:
PS C:\Android\scrcpy> .\scrcpy.exe
INFO: scrcpy 1.16 <https://github.com/Genymobile/scrcpy>
C:\Android\scrcpy\scrcpy-server: 1 file pushed, 0 skipped. 24.5 MB/s (33622 bytes in 0.001s)
[server] INFO: Device: A-gold Titan (Android 9)
INFO: Renderer: direct3d
INFO: Initial texture: 1432x1432
INFO: New texture: 1080x1432
  • When left-clicking to interact with the device, these errors are shown in the console:
[server] WARN: Ignore touch event, it was generated for a different device size
[server] WARN: Ignore touch event, it was generated for a different device size
[server] WARN: Ignore touch event, it was generated for a different device size
[server] WARN: Ignore touch event, it was generated for a different device size
[server] WARN: Ignore touch event, it was generated for a different device size

Any suggestions would be appreciated.

@icantremember
Copy link
Author

Updating my own issue:

If I specify a max resolution with:
scrcpy -m 1000
the result is a properly square scrcpy display where everything works.

Perhaps the issue is that there are few (no other?) square devices and scrcpy is coded in such a way as to not handle them correctly when left to defaults?

@rom1v
Copy link
Collaborator

rom1v commented Aug 25, 2020

INFO: Initial texture: 1432x1432
INFO: New texture: 1080x1432

It's not a problem with square vs non-square, but the fact that the encoder prodices pictures at a size different from what was requested (probably because it does not support higher definition).

See #1518

@icantremember
Copy link
Author

It's not a problem with square vs non-square, but the fact that the encoder prodices pictures at a size different from what was requested (probably because it does not support higher definition).

See #1518

Ah, thanks. I'd seen that post when searching for similar issues but it didn't (initially) appear to be related.

Also, now that I have it (mostly) sorted out, I noticed that left-click is kind of treated as a long press until I physically tap on the device screen, then left-click works normally. Still part of the same issue?

@rom1v
Copy link
Collaborator

rom1v commented Aug 26, 2020

I noticed that left-click is kind of treated as a long press until I physically tap on the device screen, then left-click works normally.

Hmm, no that's not expected (and I could not reproduce). Always? On which devices? On which system? With a modified "wm size"?

@icantremember
Copy link
Author

icantremember commented Aug 27, 2020

The only combo with the problem is the one in the OP (Titan, Win10), though I have used the Titan on a different windows machine with an earlier version of scrcpy with no issues (mouse and window/display were fine). My Pixel 4XL (11 beta) does not have the screen/display issue or the left-click issue on this machine -- tried with and without the -m option.

The left mouse issue happens whenever the device is powered on from sleep. It feels like the left-click is laggy, resulting in a long-press, but once I physically tap on the device screen, left-click is fine until the device sleeps again. Left-click drag works fine, the issue is only with click.

@rom1v
Copy link
Collaborator

rom1v commented Aug 29, 2020

Does this left-click problem also happen on v1.14?

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