scrcpy icon indicating copy to clipboard operation
scrcpy copied to clipboard

1.22 , 1.23, 1.24 does not seem to support API movewindow and postmessage mouseclick.how can fix .

Open xxdoc opened this issue 2 years ago • 14 comments

The latest version does not seem to support movewindow and sendmessage mouseclick. The mouse button must be activated in the program interface, but version 1.21 can support it.

xxdoc avatar Apr 29 '22 08:04 xxdoc

Scrcpy does not do anything related to that, so it's probably SDL. Replace SDL2.dll from an old release.

rom1v avatar Apr 29 '22 08:04 rom1v

I didn't change any code and phone. Just replaced all of them with 1.24。It works fine from 1.7 to 1.21. After I replaced it with 1.24. something is wrong. Replacement SDL2.dll with older version doesn't seem to start 1.24

xxdoc avatar Apr 30 '22 02:04 xxdoc

Adb will take a long time between input and mouse clicks quickly. scrcpy mouse click interval is very short. That's why I use scrcpy.It would be perfect to fix the sendmessage send key. Because it can transmit mouse clicks to the phone even when the phone image is minimized

xxdoc avatar Apr 30 '22 02:04 xxdoc

Could you retry an older version now?

rom1v avatar Apr 30 '22 05:04 rom1v

Could you retry an older version now?

yes。I developed based on 1.71. Later, I saw that 1.21 was updated. Yesterday, I saw that it was updated to 1.24 and replaced it. Other versions have no problem in the same situation.Of course I will keep working under 1.21

    phoneHwnd= FindWindow("SDL_app", “")

    SetParent phoneHwnd, PhoneView.hWnd '
     
    MoveWindow phoneHwnd, 0, 0, 720, 960, True ' phoneHwnd is scrcpy load  phone screen image

     then
     PostMessageW phoneHwnd, WM_LBUTTONDOWN, MK_LBUTTON,  Coordinates
 
     PostMessageW phoneHwnd, WM_LBUTTONUP, 0&, Coordinates

xxdoc avatar Apr 30 '22 06:04 xxdoc

Could you try v1.22 and 1.23 to find from which version it fails?

rom1v avatar Apr 30 '22 06:04 rom1v

ok ,i will download1.22 and1.23 to test

xxdoc avatar Apr 30 '22 06:04 xxdoc

All releases are available here: https://github.com/Genymobile/scrcpy/releases

rom1v avatar Apr 30 '22 06:04 rom1v

All releases are available here: https://github.com/Genymobile/scrcpy/releases

Sorry for my late reply. I tested 1.22 and 1.23 are not able to achieve

xxdoc avatar May 01 '22 07:05 xxdoc

can it be repaired

xxdoc avatar May 04 '22 08:05 xxdoc

If you retest now with 1.21 and it works with 1.21, try to copy SDL2.dll from 1.21 to 1.22/1.23/1.24 release directory.

I don't know what else could be the problem.

In v1.22 changelog:

Upgrade SDL to 2.0.20 in Windows releases

rom1v avatar May 04 '22 09:05 rom1v

If you retest now with 1.21 and it works with 1.21, try to copy SDL2.dll from 1.21 to 1.22/1.23/1.24 release directory.

I don't know what else could be the problem.

In v1.22 changelog:

Upgrade SDL to 2.0.20 in Windows releases

thanks 。i replaceed sdl2.dll to1.24 。now work ok 。Will the replacement of SDL affect the functionality of scrcpy?

xxdoc avatar May 05 '22 00:05 xxdoc

hi @xxdoc movewindow and sendmessage mouseclick, i also need this feature, Can you share how you did it, thank you very much

HuangGH avatar Jun 18 '22 15:06 HuangGH

I don't know what you need to do. What you're talking about is common API operations. Just send the message to the handle. Of course, there will be problems in the background of the mouse. It should be because I found that scrcpy will detect the position of the foreground mouse during the test. Always subject to the current mouse position. This estimate needs to be solved officially.

xxdoc avatar Jun 19 '22 01:06 xxdoc

I don't know what you need to do. What you're talking about is common API operations. Just send the message to the handle. Of course, there will be problems in the background of the mouse. It should be because I found that scrcpy will detect the position of the foreground mouse during the test. Always subject to the current mouse position. This estimate needs to be solved officially.

Hi xxdoc, I know it's been a while but can you please help me a bit with this issue, I will make sure I don't take much of your time, just got few questions. my email is [email protected] it would be greatful if you could just send me a message I will reply asap.

chldbwnstm avatar Mar 06 '24 12:03 chldbwnstm