fix: re-init MaaTouch when orientation changes

This commit is contained in:
2026-07-05 23:08:36 +08:00
parent 6d2b536050
commit 7415c7e217
3 changed files with 50 additions and 2 deletions
+9
View File
@@ -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")