From 4cac7d07db09f2f1c3d07e99e64a2af32a30f613 Mon Sep 17 00:00:00 2001 From: LmeSzinc <37934724+LmeSzinc@users.noreply.github.com> Date: Sun, 1 Oct 2023 17:37:58 +0800 Subject: [PATCH] Fix: Start/stop emulator in path with space --- module/device/platform/platform_windows.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/module/device/platform/platform_windows.py b/module/device/platform/platform_windows.py index 9e7d9b393..049015663 100644 --- a/module/device/platform/platform_windows.py +++ b/module/device/platform/platform_windows.py @@ -88,19 +88,19 @@ class PlatformWindows(PlatformBase, EmulatorManager): self.execute(exe) elif instance == Emulator.MuMuPlayerX: # NemuPlayer.exe -m nemu-12.0-x64-default - self.execute(f'{exe} -m {instance.name}') + self.execute(f'"{exe}" -m {instance.name}') elif instance == Emulator.MuMuPlayer12: # MuMuPlayer.exe -v 0 - self.execute(f'{exe} -v {instance.MuMuPlayer12_id}') + self.execute(f'"{exe}" -v {instance.MuMuPlayer12_id}') elif instance == Emulator.NoxPlayerFamily: # Nox.exe -clone:Nox_1 - self.execute(f'{exe} -clone:{instance.name}') + self.execute(f'"{exe}" -clone:{instance.name}') elif instance == Emulator.BlueStacks5: # HD-Player.exe -instance Pie64 - self.execute(f'{exe} -instance {instance.name}') + self.execute(f'"{exe}" -instance {instance.name}') elif instance == Emulator.BlueStacks4: # BlueStacks\Client\Bluestacks.exe -vmname Android_1 - self.execute(f'{exe} -vmname {instance.name}') + self.execute(f'"{exe}" -vmname {instance.name}') else: raise EmulatorUnknown(f'Cannot start an unknown emulator instance: {instance}') @@ -152,7 +152,7 @@ class PlatformWindows(PlatformBase, EmulatorManager): # "C:\Program Files\MuMuVMMVbox\Hypervisor\MuMuVMMSVC.exe" --Embedding elif instance == Emulator.NoxPlayerFamily: # Nox.exe -clone:Nox_1 -quit - self.execute(f'{exe} -clone:{instance.name} -quit') + self.execute(f'"{exe}" -clone:{instance.name} -quit') else: raise EmulatorUnknown(f'Cannot stop an unknown emulator instance: {instance}')