Fix: Limit config combinations in cloud game

This commit is contained in:
LmeSzinc 2024-03-16 16:24:44 +08:00
parent f93c3cb460
commit e90f865674
2 changed files with 8 additions and 2 deletions

View File

@ -847,6 +847,7 @@ class ConfigUpdater:
yield 'Rogue.RogueWorld.UseImmersifier', True
elif key == 'Alas.Emulator.GameClient' and value == 'cloud_android':
yield 'Alas.Emulator.PackageName', 'CN-Official'
yield 'Alas.Optimization.WhenTaskQueueEmpty', 'close_game'
def iter_hidden_args(self, data) -> t.Iterator[str]:
"""

View File

@ -288,8 +288,13 @@ class LoginAndroidCloud(ModuleBase):
"""
logger.hr('Cloud ensure ingame', level=1)
if self.config.Emulator_GameClient != 'cloud_android':
self.config.Emulator_GameClient = 'cloud_android'
with self.config.multi_set():
if self.config.Emulator_GameClient != 'cloud_android':
self.config.Emulator_GameClient = 'cloud_android'
if self.config.Emulator_PackageName != 'CN-Official':
self.config.Emulator_PackageName = 'CN-Official'
if self.config.Optimization_WhenTaskQueueEmpty != 'close_game':
self.config.Optimization_WhenTaskQueueEmpty = 'close_game'
for _ in range(3):
if self.device.app_is_running():