mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-20 22:35:35 +08:00
Fix: Failed to init nemu_ipc on empty emulator path (#3616)
This commit is contained in:
@@ -415,22 +415,24 @@ class NemuIpc(Platform):
|
|||||||
Initialize a nemu ipc implementation
|
Initialize a nemu ipc implementation
|
||||||
"""
|
"""
|
||||||
# Try existing settings first
|
# Try existing settings first
|
||||||
folder = os.path.abspath(os.path.join(self.config.EmulatorInfo_path, '../../'))
|
if self.config.EmulatorInfo_path:
|
||||||
index = serial_to_id(self.serial)
|
folder = os.path.abspath(os.path.join(self.config.EmulatorInfo_path, '../../'))
|
||||||
if index is not None:
|
index = serial_to_id(self.serial)
|
||||||
try:
|
if index is not None:
|
||||||
return NemuIpcImpl(
|
try:
|
||||||
nemu_folder=folder,
|
return NemuIpcImpl(
|
||||||
instance_id=index,
|
nemu_folder=folder,
|
||||||
display_id=0
|
instance_id=index,
|
||||||
).__enter__()
|
display_id=0
|
||||||
except (NemuIpcIncompatible, NemuIpcError) as e:
|
).__enter__()
|
||||||
logger.error(e)
|
except (NemuIpcIncompatible, NemuIpcError) as e:
|
||||||
logger.error('Emulator info incorrect')
|
logger.error(e)
|
||||||
|
logger.error('Emulator info incorrect')
|
||||||
|
|
||||||
# Search emulator instance
|
# Search emulator instance
|
||||||
# with E:\ProgramFiles\MuMuPlayer-12.0\shell\MuMuPlayer.exe
|
# with E:\ProgramFiles\MuMuPlayer-12.0\shell\MuMuPlayer.exe
|
||||||
# installation path is E:\ProgramFiles\MuMuPlayer-12.0
|
# installation path is E:\ProgramFiles\MuMuPlayer-12.0
|
||||||
|
_ = self.emulator_instance
|
||||||
try:
|
try:
|
||||||
return NemuIpcImpl(
|
return NemuIpcImpl(
|
||||||
nemu_folder=self.emulator_instance.emulator.abspath('../'),
|
nemu_folder=self.emulator_instance.emulator.abspath('../'),
|
||||||
|
|||||||
Reference in New Issue
Block a user