|
|
@@ -180,7 +180,10 @@ class PlatformWindows(PlatformBase, EmulatorManager):
|
|
|
# MuMuPlayer.exe -v 0
|
|
|
if instance.MuMuPlayer12_id is None:
|
|
|
logger.warning(f'Cannot get MuMu instance index from name {instance.name}')
|
|
|
- self.execute(f'"{exe}" -v {instance.MuMuPlayer12_id}', show_window=show_window)
|
|
|
+ if re.search(r'MuMuPlayer(?:Global)?-15\.0-\d+', instance.name):
|
|
|
+ self.execute(f'"{Emulator.single_to_console(exe)}" control -v {instance.MuMuPlayer12_id} --version 15 launch', show_window=show_window)
|
|
|
+ else:
|
|
|
+ self.execute(f'"{exe}" -v {instance.MuMuPlayer12_id}', show_window=show_window)
|
|
|
elif instance == Emulator.LDPlayerFamily:
|
|
|
# ldconsole.exe launch --index 0
|
|
|
self.execute(f'"{Emulator.single_to_console(exe)}" launch --index {instance.LDPlayer_id}', show_window=show_window)
|
|
|
@@ -236,7 +239,11 @@ class PlatformWindows(PlatformBase, EmulatorManager):
|
|
|
# MuMuManager.exe api -v 1 shutdown_player
|
|
|
if instance.MuMuPlayer12_id is None:
|
|
|
logger.warning(f'Cannot get MuMu instance index from name {instance.name}')
|
|
|
- self.execute(f'"{Emulator.single_to_console(exe)}" api -v {instance.MuMuPlayer12_id} shutdown_player')
|
|
|
+ if re.search(r'MuMuPlayer(?:Global)?-15\.0-\d+', instance.name):
|
|
|
+ # Finish shutdown before emulator_start() launches the same instance.
|
|
|
+ self.execute(f'"{Emulator.single_to_console(exe)}" control -v {instance.MuMuPlayer12_id} --version 15 shutdown').wait(timeout=30)
|
|
|
+ else:
|
|
|
+ self.execute(f'"{Emulator.single_to_console(exe)}" api -v {instance.MuMuPlayer12_id} shutdown_player')
|
|
|
elif instance == Emulator.LDPlayerFamily:
|
|
|
# ldconsole.exe quit --index 0
|
|
|
self.execute(f'"{Emulator.single_to_console(exe)}" quit --index {instance.LDPlayer_id}')
|