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

Ignore touch event, it was generated for a different device size #1645

Closed
swamikamal opened this issue Aug 7, 2020 · 15 comments
Closed

Ignore touch event, it was generated for a different device size #1645

swamikamal opened this issue Aug 7, 2020 · 15 comments

Comments

@swamikamal
Copy link

Ignore touch event, it was generated for a different device size
-v 1.15 not recognizing my click as touch on screen
please help me
Screenshot (423)

@rom1v
Copy link
Collaborator

rom1v commented Aug 7, 2020

Ah, great, it was a good idea to add the log a973757
See #1518 (comment)

The reason is that on some devices, the video encoder on the device does not respect the requested size, and we can't detect this change on the server side.

To avoid the problem, check the first lines in scrcpy output:

INFO: Initial texture: 1080x2336
INFO: New texture: 888x1920

And limit the size to what the encoder actually produces. Here:

scrcpy -m1920

(take the greatest value of the second line)

@rom1v
Copy link
Collaborator

rom1v commented Aug 7, 2020

(please post output as text instead of a screenshot)

Then just run scrcpy -m1920 as I explained above.

@swamikamal
Copy link
Author

Sorry!! And Thank you very much Sir.

@khalidrobbani
Copy link

thank you so much, master. it works for my oppo F7 hihi

@rom1v rom1v mentioned this issue Mar 11, 2021
2 tasks
@skivox52
Copy link

Same issue on MI9SE.
I tried using different "-m XXXX" option, but still doesn't work.

How to know which value to use please ?
Here is the output while launching scrcpy without "-m" option :

[server] INFO: Device: Xiaomi Mi 9 SE (Android 10)INFO: Renderer: opengl
INFO: OpenGL version: 3.0 Mesa 20.0.8
INFO: Trilinear filtering enabled
INFO: Initial texture: 1080x2336

Merci

@rom1v
Copy link
Collaborator

rom1v commented May 20, 2021

@skivox52 If you don't have two lines like this immediately on start:

INFO: Initial texture: 1080x2336
INFO: New texture: 888x1920

then this is not the same problem.

What do you observe? What error messages do you have?

@skivox52
Copy link

skivox52 commented May 20, 2021

@skivox52 If you don't have two lines like this immediately on start:

INFO: Initial texture: 1080x2336
INFO: New texture: 888x1920

then this is not the same problem.

What do you observe? What error messages do you have?

I do not have these two lines.
Only the lines I shown you.

I do not get any error message, but the mouse event doesn't work.
if i open app touching phisically my phone, i can see it on scrcpy but i cannot interact with it using the mouse.

Sorry if I posted in the wrong thread.
Thanks

@skivox52
Copy link

skivox52 commented May 20, 2021

@skivox52 https://github.com/Genymobile/scrcpy/blob/master/FAQ.md#mouse-and-keyboard-do-not-work

Thanks a lot, going to check this

EDIT : Thank you bro, it works very fine now :)

@mjwaghmare
Copy link

(please post output as text instead of a screenshot)

Then just run scrcpy -m1920 as I explained above.

how to set it permanently??

@rom1v
Copy link
Collaborator

rom1v commented Feb 21, 2022

how to set it permanently??

You could create a script: https://github.com/Genymobile/scrcpy/blob/master/FAQ.md#command-line-on-windows

(currently, there is no config file)

@mjwaghmare
Copy link

mjwaghmare commented Mar 28, 2022

@rom1v How to set this in the Mac OS?

@rom1v
Copy link
Collaborator

rom1v commented Mar 28, 2022

Create a file myscrcpy containing:

#!/bin/bash
scrcpy -m1920

Make it ewecutable (chmod +x myscrcpy), and execute (./myscript).

@anszom
Copy link

anszom commented Nov 24, 2022

I'm encountering a similar problem on a lenovo tablet. For some reasons the encoder returned a smaller texture no matter what values of -m were supplied.

Native resolution:

INFO: Initial texture: 1024x600
INFO: New texture: 1024x592

With -m800

INFO: Initial texture: 800x472
INFO: New texture: 800x464

My work-around is to crop the few pixels off the edge of the screen with --crop=592:1024:0:0
Surely there must be a better way

@14790897
Copy link

thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants