mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-16 12:47:23 +08:00
Opt: Release nemu_ipc connection during wait
This commit is contained in:
@@ -166,6 +166,8 @@ class Device(Screenshot, Control, AppControl):
|
|||||||
# stop it during wait
|
# stop it during wait
|
||||||
if self.config.Emulator_ScreenshotMethod == 'scrcpy':
|
if self.config.Emulator_ScreenshotMethod == 'scrcpy':
|
||||||
self._scrcpy_server_stop()
|
self._scrcpy_server_stop()
|
||||||
|
if self.config.Emulator_ScreenshotMethod == 'nemu_ipc':
|
||||||
|
self.nemu_ipc_release()
|
||||||
|
|
||||||
def stuck_record_add(self, button):
|
def stuck_record_add(self, button):
|
||||||
self.detect_record.add(str(button))
|
self.detect_record.add(str(button))
|
||||||
|
|||||||
@@ -459,6 +459,7 @@ class NemuIpc(Platform):
|
|||||||
if has_cached_property(self, 'nemu_ipc'):
|
if has_cached_property(self, 'nemu_ipc'):
|
||||||
self.nemu_ipc.disconnect()
|
self.nemu_ipc.disconnect()
|
||||||
del_cached_property(self, 'nemu_ipc')
|
del_cached_property(self, 'nemu_ipc')
|
||||||
|
logger.info('nemu_ipc released')
|
||||||
|
|
||||||
def screenshot_nemu_ipc(self):
|
def screenshot_nemu_ipc(self):
|
||||||
image = self.nemu_ipc.screenshot()
|
image = self.nemu_ipc.screenshot()
|
||||||
|
|||||||
Reference in New Issue
Block a user