Skip to content
This repository has been archived by the owner on Dec 29, 2023. It is now read-only.

Touch Mappings port to Override Size repos #74

Closed
srevinsaju opened this issue Mar 13, 2020 · 10 comments
Closed

Touch Mappings port to Override Size repos #74

srevinsaju opened this issue Mar 13, 2020 · 10 comments
Labels
feature Enhancement

Comments

@srevinsaju
Copy link
Owner

python3 -V : Python 3.8.2
python -V : Command 'python' not found
Btw, using python3 scripts/guiscrcpy-mapper i am able to see the key mapper and it generate a json file called guiscrcpy.mapper.json on .config/guiscrcpy so for me i can start prepare a file to my need but i need an example.
using the guiscrcpy mapper i have this message error:
Lets Check Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/guiscrcpy-3.3-py3.8.egg/guiscrcpy/lib/mapper.py", line 185, in keyreg fixy = rely * int(dimValues[1]) ValueError: invalid literal for int() with base 10: '2960\nOverride size' PyQt5.QtCore.QPoint(365, 355) LAST
That why i need and example file to generate manually if we are in need.
Thank 👍

Originally posted by @karousn in #13 (comment)

@karousn
Copy link

karousn commented Mar 20, 2020

any news about this ?

@srevinsaju srevinsaju added the feature Enhancement label Mar 26, 2020
@srevinsaju
Copy link
Owner Author

@karousn Maybe I will finish that by this weekend. I apologize for the delay

@srevinsaju
Copy link
Owner Author

@karousn I fixed the mapper, can you please test it?

@srevinsaju srevinsaju added the 3.5 label Mar 26, 2020
@karousn
Copy link

karousn commented Mar 28, 2020

The last tag i can get it is 3.4 so i try it and i have this message:

Waiting for device
Device : OK!
['1440', '2960\nOverride size']  DIMENSIONS 
LOG: Key:Pos JSON Configuration file found in  /home/user/.config/guiscrcpy/  directory
KEY:A {'key': [], 'pos': []}
[SERVER] LISTENING VALUES: Your keys are being listened by server. 
{'key': [], 'pos': []}

@srevinsaju
Copy link
Owner Author

srevinsaju commented Mar 28, 2020

@karousn can you try out 2583d1f
I can provide some help if you let me know the method you are following to test changes

@karousn
Copy link

karousn commented Mar 28, 2020

To do the test i do:

git checkout 2583d1f
sudo pip3 uninstall guiscrcpy
python3 setup.py install --user

When i try to use guiscrcpy directly in any folder i have ModuleNotFoundError: No module named 'PyQt5.sip' as message error so i use python -m guiscrcpy or python scripts/guiscrcpy
before that i activate the Pointer location on my phone to see the coordination of my click, and i modify the json keymapper file directly and i restart my guiscrcpy after that in each modification.( it was crashing some time.. i use force quit to exit).
i see that you use adb shell input tap X Y to send the event of click to my phone, it is a little bit slow specially in gaming. if you have any idea how can i improve that.

@srevinsaju
Copy link
Owner Author

srevinsaju commented Mar 28, 2020

i see that you use adb shell input tap X Y to send the event of click to my phone, it is a little bit slow specially in gaming. if you have any idea how can i improve that.

I will have to use scrcpy's fast adb shellinput's but i have 0 Java background, am still 17 lol

pip3 install PyQt5-sip --user
rm ~/.config/guiscrcpy/*mapper*
guiscrcpy-mapper
guiscrcpy

Hope this would work
You can check

guiscrcpy-mapper --help

to see the possible options.
Every time you remove the json file, the mapper is reseted to the original values

@karousn
Copy link

karousn commented Mar 30, 2020

by curiosity witch lib java you will use to accelerate the send of the event action to the phone ?

@srevinsaju
Copy link
Owner Author

I have to use scrcpy's scrcpy-server Input.java to create a socket to pass she'll input events. The current adb shell input does a lot of checos, for eg: check if device is connected, copy the process to mobile, start an Android server daemon, and then run the process and then wait for the process to finish on Android and then send the complete signal to the PC. This is quite complicated and takes approxately 1.5 seconds. Rather, only one server can be started, and then only the input processes can be sent over the tunnel. I am bad at networking and Java, so it's quite complicated to understand Java or Sockets. If you have any clue, I would be glad to use it.

See Scrcpy's issue Genymobile/scrcpy#231 (comment)

srevinsaju added a commit that referenced this issue Apr 6, 2020
* Update gitpython from 3.0.7 to 3.1.0 (#68)

* Release 3.3 Stable (#69)

* Init downloader

* Add init UI

* Edit Object name of Initializer

* Add support for selecting scrcpy executable

* Fix Toolbar appearance (panel holder)

* Update version

* Add desktop file support for Linux OS

* Amend requirements, add dependency

* PEP8 and Flake8 Fixes

* Remove unnecessary imports in setup.py

* Add dependency pywin32 to windows systems

* Fix desktop function for Windows and Linux

* Fix font manager

* Change modes

* Add windows tools

* update version in version.txt

* update version in ver.py

* Update guiscrcpy_windows spec file

* Fix #75. Fix FileNotFoundError

* Fix mapper to port for Override Resolutions #74

* Remove dependency psutil for MacOS

* Add conditional launching of psutil depending on its installed or not

* Prepare release 3.5

Signed-off-by: Srevin Saju <srevin03@gmail.com>

* Prepare release 3.5

* Fix appimage config file

* Fix version

* Postpone appimage

Co-authored-by: pyup.io bot <github-bot@pyup.io>
@srevinsaju
Copy link
Owner Author

Closed by 3.5

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature Enhancement
Projects
None yet
Development

No branches or pull requests

2 participants