Fix: Set nemu_ipc before screenshot_interval_set

This commit is contained in:
LmeSzinc 2024-05-12 00:28:33 +08:00
parent 9dcc3793be
commit fc48067495

View File

@ -87,6 +87,12 @@ class Device(Screenshot, Control, AppControl):
if self.config.EmulatorInfo_Emulator == 'auto': if self.config.EmulatorInfo_Emulator == 'auto':
_ = self.emulator_instance _ = self.emulator_instance
# SRC only, use nemu_ipc if available
available = self.nemu_ipc_available()
logger.attr('nemu_ipc_available', available)
if available:
self.config.override(Emulator_ScreenshotMethod='nemu_ipc')
self.screenshot_interval_set() self.screenshot_interval_set()
self.method_check() self.method_check()
@ -101,12 +107,6 @@ class Device(Screenshot, Control, AppControl):
if self.config.Emulator_ControlMethod == 'minitouch': if self.config.Emulator_ControlMethod == 'minitouch':
self.early_minitouch_init() self.early_minitouch_init()
# SRC only, use nemu_ipc if available
available = self.nemu_ipc_available()
logger.attr('nemu_ipc_available', available)
if available:
self.config.override(Emulator_ScreenshotMethod='nemu_ipc')
def run_simple_screenshot_benchmark(self): def run_simple_screenshot_benchmark(self):
""" """
Perform a screenshot method benchmark, test 3 times on each method. Perform a screenshot method benchmark, test 3 times on each method.