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

When the device screen rotation direction changes, the saturation or color gamut decreases. #5782

Open
TBCJames opened this issue Jan 22, 2025 · 6 comments

Comments

@TBCJames
Copy link

Environment

  • OS: MacOS 15.3
  • **Scrcpy version:**3.1
  • Installation method: brew
  • **Device model:**Macbook Pro 14' 2023
  • Android version: 15

Describe the bug

When the device screen rotation direction changes, the color of the scrcpy changes: the saturation or color gamut decreases, making the image look gray. By comparing it with the newly opened window, the problem can be clearly seen
This issue occurs on MacOS but not on Windows.

@TBCJames
Copy link
Author

Image

@rom1v
Copy link
Collaborator

rom1v commented Jan 22, 2025

If this happens only on macOS, this is probably a SDL issue.

If you record: scrcpy --record=file.mp4 then play the file, do you have the same problem?

@TBCJames
Copy link
Author

The problem did not occur in the recorded file, but only appears in the window.

@rom1v
Copy link
Collaborator

rom1v commented Jan 22, 2025

And this happens after a rotation, regardless of the initial orientation?

What about yet another rotation? Does it work again?

@TBCJames
Copy link
Author

Yes, regardless of the initial orientation, this problem occurs as long as there is a rotation. The problem still exists with another rotation and will not get worse or restore.

@rom1v
Copy link
Collaborator

rom1v commented Jan 22, 2025

Check your SDL version in the output of scrcpy -v, and please report an issue here: https://github.com/libsdl-org/SDL/

It seems that further textures created by SDL_CreateTexture() behave differently as the first one, only on macOS:

scrcpy/app/src/display.c

Lines 130 to 132 in 0ba9d35

SDL_Texture *texture = SDL_CreateTexture(renderer, SDL_PIXELFORMAT_YV12,
SDL_TEXTUREACCESS_STREAMING,
size.width, size.height);

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