mirror of
https://github.com/TheFunny/ArisuAutoSweeper
synced 2026-10-11 17:42:05 +00:00
fix: re-init MaaTouch when orientation changes
This commit is contained in:
@@ -409,6 +409,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")
|
||||
|
||||
Reference in New Issue
Block a user