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

Resizing in Full Screen does not resize the frame #1433

Open
2 tasks done
ibrahim-mubarak opened this issue May 26, 2020 · 9 comments
Open
2 tasks done

Resizing in Full Screen does not resize the frame #1433

ibrahim-mubarak opened this issue May 26, 2020 · 9 comments

Comments

@ibrahim-mubarak
Copy link

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

Environment

  • OS: macOS
  • scrcpy version: 1.12.1
  • installation method: brew
  • device model: OnePlus 6
  • Android version: 10

Describe the bug
When scrcpy is sent to Split Screen on macOS (for eg: with Android Studio), resizing the split does not resize the content but only extends the black border and sometimes just exits out of split screen mode

Before Resizing After resizing
Before Resizing After Resizing
2020-05-26 14:37:37.931 scrcpy[71956:338561] INFO: scrcpy 1.12.1 <https://github.com/Genymobile/scrcpy>
/usr/local/Cellar/scrcpy/1.12.1/share/scrcpy/scrcpy-server: 1 file pushed, 0 skipped. 31.5 MB/s (26202 bytes in 0.001s)
2020-05-26 14:37:38.782 scrcpy[71956:338561] INFO: Initial texture: 1080x2280
@rom1v
Copy link
Collaborator

rom1v commented May 26, 2020

Could you test #1408 please?

@ibrahim-mubarak
Copy link
Author

Nope, This does not work. Tried with dev branch and render_rework branch

Screenshot 2020-05-27 at 1 49 42 PM

2020-05-27 13:48:41.829 scrcpy[21377:86240] INFO: scrcpy 1.13 <https://github.com/Genymobile/scrcpy>
x/server/scrcpy-server: 1 file pushed, 0 skipped. 108.1 MB/s (30610 bytes in 0.000s)
[server] INFO: Device: OnePlus ONEPLUS A6000 (Android 10)
2020-05-27 13:48:45.691 scrcpy[21377:86240] INFO: Renderer: metal
2020-05-27 13:48:45.691 scrcpy[21377:86240] WARN: Trilinear filtering disabled (not an OpenGL renderer)
2020-05-27 13:48:45.693 scrcpy[21377:86240] INFO: Initial texture: 1080x2280

@rom1v
Copy link
Collaborator

rom1v commented May 27, 2020

OK, thank you for your tests.

I guess this type of resizing is not supported/correctly managed by SDL.

Could you please log the window events received from SDL when you resize in that split mode?

diff --git a/app/src/screen.c b/app/src/screen.c
index 66a1163..dce5b8e 100644
--- a/app/src/screen.c
+++ b/app/src/screen.c
@@ -554,6 +554,7 @@ screen_resize_to_pixel_perfect(struct screen *screen) {
 void
 screen_handle_window_event(struct screen *screen,
                            const SDL_WindowEvent *event) {
+    LOGI("event %d", event->event);
     switch (event->event) {
         case SDL_WINDOWEVENT_EXPOSED:
             screen_render(screen, true);

@ibrahim-mubarak
Copy link
Author

Logs on Launch

2020-05-27 15:11:29.303 scrcpy[55752:255407] INFO: scrcpy 1.13 <https://github.com/Genymobile/scrcpy>
x/server/scrcpy-server: 1 file pushed, 0 skipped. 25.8 MB/s (30610 bytes in 0.001s)
[server] INFO: Device: OnePlus ONEPLUS A6000 (Android 10)
2020-05-27 15:11:31.146 scrcpy[55752:255407] INFO: Renderer: metal
2020-05-27 15:11:31.146 scrcpy[55752:255407] WARN: Trilinear filtering disabled (not an OpenGL renderer)
2020-05-27 15:11:31.149 scrcpy[55752:255407] INFO: Initial texture: 1080x2280
2020-05-27 15:11:31.481 scrcpy[55752:255407] INFO: event 6
2020-05-27 15:11:31.485 scrcpy[55752:255407] INFO: event 3
2020-05-27 15:11:31.529 scrcpy[55752:255407] INFO: event 12
2020-05-27 15:11:31.529 scrcpy[55752:255407] INFO: event 1
2020-05-27 15:11:33.569 scrcpy[55752:255407] INFO: event 13

Logs on going to Split Screen/Full Screen

2020-05-27 15:12:11.042 scrcpy[55752:255407] INFO: event 4
2020-05-27 15:12:11.042 scrcpy[55752:255407] INFO: event 6
2020-05-27 15:12:11.046 scrcpy[55752:255407] INFO: event 5
2020-05-27 15:12:11.046 scrcpy[55752:255407] INFO: event 3

Logs on Resizing the Frame

2020-05-27 15:13:08.854 scrcpy[55752:255407] INFO: event 4

@rom1v
Copy link
Collaborator

rom1v commented May 27, 2020

Logs on Resizing the Frame

2020-05-27 15:13:08.854 scrcpy[55752:255407] INFO: event 4

4 is SDL_WINDOWEVENT_MOVED, so SDL does not trigger any resize event in that case 😕

I guess it's just not managed by SDL.

@ibrahim-mubarak
Copy link
Author

Is there any way to identify when Scrcpy goes full-screen?

It should not be possible to "Move" the window once you're in full screen.

Also I'll try to send you event logs for when it exits out of split screen when we resize it.

Could be a bug with SDL itself?

@ibrahim-mubarak
Copy link
Author

These are the events when we resize it to a smaller screen and it exits out of Full Screen.

2020-05-27 18:59:31.085 scrcpy[4807:47139] INFO: event 4
2020-05-27 18:59:31.085 scrcpy[4807:47139] INFO: event 6
2020-05-27 18:59:31.086 scrcpy[4807:47139] INFO: event 5
2020-05-27 18:59:31.086 scrcpy[4807:47139] INFO: event 8
2020-05-27 18:59:31.086 scrcpy[4807:47139] INFO: event 3
2020-05-27 18:59:31.153 scrcpy[4807:47139] INFO: event 3
2020-05-27 18:59:31.697 scrcpy[4807:47139] INFO: event 4
2020-05-27 18:59:31.703 scrcpy[4807:47139] INFO: event 6
2020-05-27 18:59:31.717 scrcpy[4807:47139] INFO: event 5
2020-05-27 18:59:31.717 scrcpy[4807:47139] INFO: event 9

@rom1v
Copy link
Collaborator

rom1v commented Oct 27, 2021

Still happening?

@rsanjuan87
Copy link

Still happening?

not to me

  • OS: MacOS Catalina 10.15.7
  • scrcpy version: 1.23
  • installation method: brew
  • device model: Xiaomi Mi 8 Lite
  • Android version: 10

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

3 participants