From 00f1d04694c5161587b42a30271ebcf1be5fc316 Mon Sep 17 00:00:00 2001 From: LmeSzinc <37934724+LmeSzinc@users.noreply.github.com> Date: Mon, 15 Jul 2024 23:39:46 +0800 Subject: [PATCH] Fix: Set game client if package name is set so setting Emulator_GameClient can be fool-proof --- module/device/connection.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/module/device/connection.py b/module/device/connection.py index fdc03a994..366423afc 100644 --- a/module/device/connection.py +++ b/module/device/connection.py @@ -1023,7 +1023,14 @@ class Connection(ConnectionAttr): self.package = packages[0] # Set config if set_config: - self.config.Emulator_PackageName = server_.to_server(self.package) + with self.config.multi_set(): + self.config.Emulator_PackageName = server_.to_server(self.package) + if self.package in server_.VALID_CLOUD_PACKAGE: + if self.config.Emulator_GameClient != 'cloud_android': + self.config.Emulator_GameClient = 'cloud_android' + else: + if self.config.Emulator_GameClient != 'android': + self.config.Emulator_GameClient = 'android' # Set server # logger.info('Server changed, release resources') # set_server(self.package)