Fix: Skip first screenshot in tools

since you cannot run benchmark before benckmarked
This commit is contained in:
LmeSzinc 2024-06-21 00:34:11 +08:00
parent 24aa3e00bd
commit f810db8bea
2 changed files with 4 additions and 3 deletions

View File

@ -62,9 +62,10 @@ class AzurLaneAutoScript:
logger.exception(e)
exit(1)
def run(self, command):
def run(self, command, skip_first_screenshot=False):
try:
self.device.screenshot()
if not skip_first_screenshot:
self.device.screenshot()
self.__getattribute__(command)()
return True
except TaskEnd:

View File

@ -153,7 +153,7 @@ class ProcessManager:
elif func in get_available_func():
from alas import AzurLaneAutoScript
AzurLaneAutoScript(config_name=config_name).run(inflection.underscore(func))
AzurLaneAutoScript(config_name=config_name).run(inflection.underscore(func), skip_first_screenshot=True)
elif func in get_available_mod():
mod = load_mod(func)