1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-11 20:58:19 +08:00

Fix: continuously check rotation on unknown UI (#4729)

This commit is contained in:
LmeSzinc
2025-05-24 00:42:13 +08:00
parent 56a010366c
commit 8d61802fd1

View File

@@ -165,9 +165,7 @@ class UI(InfoHandler):
if self.config.Emulator_ControlMethod == "uiautomator2":
self.device.uninstall_minicap()
@run_once
def rotation_check():
self.device.get_orientation()
orientation_timer = Timer(5)
timeout = Timer(10, count=20).start()
while 1:
@@ -208,7 +206,10 @@ class UI(InfoHandler):
app_check()
minicap_check()
rotation_check()
# continuously check rotation
if orientation_timer.reached():
self.device.get_orientation()
orientation_timer.reset()
# Unknown page, need manual switching
logger.warning("Unknown ui page")