1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-12 13:17:00 +08:00

Fix: [ALAS] Re-init MaaTouch when orientation changed

This commit is contained in:
LmeSzinc
2024-04-21 23:36:23 +08:00
parent 670541f515
commit 3757510ecd
3 changed files with 49 additions and 1 deletions

View File

@@ -408,6 +408,15 @@ class Minitouch(Connection):
max_x, max_y = 1280, 720
max_contacts = 2
max_pressure = 50
# Try to close existing stream
if self._minitouch_client is not None:
try:
self._minitouch_client.close()
except Exception as e:
logger.error(e)
del self._minitouch_client
self.get_orientation()
self._minitouch_port = self.adb_forward("localabstract:minitouch")