mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-11 20:58:19 +08:00
Opt: Show unexpected screenshot in ascreencap
This commit is contained in:
@@ -103,7 +103,7 @@ class Adb(Connection):
|
||||
continue
|
||||
|
||||
self.__screenshot_method_fixed = self.__screenshot_method
|
||||
if len(screenshot) < 100:
|
||||
if len(screenshot) < 500:
|
||||
logger.warning(f'Unexpected screenshot: {screenshot}')
|
||||
raise OSError(f'cannot load screenshot')
|
||||
|
||||
@@ -118,7 +118,7 @@ class Adb(Connection):
|
||||
@retry
|
||||
def screenshot_adb_nc(self):
|
||||
data = self.adb_shell_nc(['screencap'])
|
||||
if len(data) < 100:
|
||||
if len(data) < 500:
|
||||
logger.warning(f'Unexpected screenshot: {data}')
|
||||
|
||||
# Load data
|
||||
|
||||
@@ -158,7 +158,7 @@ class AScreenCap(Connection):
|
||||
continue
|
||||
|
||||
self.__screenshot_method_fixed = self.__screenshot_method
|
||||
if len(screenshot) < 100:
|
||||
if len(screenshot) < 500:
|
||||
logger.warning(f'Unexpected screenshot: {screenshot}')
|
||||
raise OSError(f'cannot load screenshot')
|
||||
|
||||
@@ -173,5 +173,7 @@ class AScreenCap(Connection):
|
||||
@retry
|
||||
def screenshot_ascreencap_nc(self):
|
||||
data = self.adb_shell_nc([self.config.ASCREENCAP_FILEPATH_REMOTE, '--pack', '2', '--stdout'])
|
||||
if len(data) < 500:
|
||||
logger.warning(f'Unexpected screenshot: {data}')
|
||||
|
||||
return self.__uncompress(data)
|
||||
|
||||
Reference in New Issue
Block a user