scrcpy icon indicating copy to clipboard operation
scrcpy copied to clipboard

Software renderer on macOS only displays top left quadrant

Open Atemu opened this issue 4 years ago • 6 comments

  • [x] I have read the FAQ.
  • [x] I have searched in existing issues.

Environment

  • OS: macOS 11.6
  • scrcpy version:
scrcpy 1.19

dependencies:
- SDL 2.0.14
- libavcodec 58.134.100
- libavformat 58.76.100
- libavutil 56.70.100
  • installation method: NixOS/nixpkgs@ee084c02040e864eeeb4cf4f8538d92f7c675671
  • device model: SM-A505FN
  • Android version: 11

Describe the bug A clear and concise description of what the bug is.

scrcpy only renders the top left quadrant in software renderer mode. This does not happen with opengl or metal.

It'd probably be best to use one of those by default instead of software rendering.

Atemu avatar Oct 12 '21 14:10 Atemu

Refs https://github.com/Genymobile/scrcpy/issues/1673#issuecomment-673519500

rom1v avatar Oct 12 '21 14:10 rom1v

I had the same issue: only the top-left corner was visible. My solution was:

scrcpy --render-driver metal

I've tried all drivers and 2 of them worked: metal and opengl.

Environment

  • MacBookAir M1 - MacOS 13.0 (Ventura)
$ scrcpy --version

scrcpy 1.24 
Dependencies (compiled / linked):
 - SDL: 2.0.22 / 2.0.22
 - libavcodec: 58.134.100 / 58.134.100
 - libavformat: 58.76.100 / 58.76.100
 - libavutil: 56.70.100 / 56.70.100
 - libusb: - / 1.0.26

Installation:

nix-shell -p scrcpy -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/ee01de29d2f58d56b1be4ae24c24bd91c5380cea.tar.gz

lalyos avatar Mar 02 '23 05:03 lalyos

Why doesn't scrcpy default to metal or OGL?

Atemu avatar Mar 02 '23 12:03 Atemu

Why doesn't scrcpy default to metal or OGL?

Scrcpy leave SDL choose the render driver.

If you explicitly set --render-driver=, then it just sets an hint (SDL_HINT_RENDER_DRIVER for SDL: https://github.com/Genymobile/scrcpy/blob/b4caa483dd6682279170b5ec61963e6239f15072/app/src/scrcpy.c#L95-L97

So maybe a SDL issue?

SDL says:

By default the first one in the list that is available on the current platform is chosen.

rom1v avatar Mar 02 '23 16:03 rom1v

Oh, maybe it's related to nix? (both of you use nix)

rom1v avatar Mar 02 '23 16:03 rom1v

Could certainly be a packaging bug on our side. How is this list determined?

Atemu avatar Mar 02 '23 18:03 Atemu