diff --git a/app/src/main/java/com/gh/common/util/GameUtils.java b/app/src/main/java/com/gh/common/util/GameUtils.java index c729270bdd..73b8dffb6c 100644 --- a/app/src/main/java/com/gh/common/util/GameUtils.java +++ b/app/src/main/java/com/gh/common/util/GameUtils.java @@ -78,6 +78,9 @@ public class GameUtils { int pluginCount = 0; // 可插件化数量 int updateCount = 0; // 可更新数量 int installCount = 0; // 已安装数量 + + boolean isRelatedEmulatorInstalled = false; // 若该游戏是模拟器游戏时其对应的模拟器是否已经安装 + DownloadEntity downloadEntity; Object gh_id; apkFor: @@ -123,20 +126,26 @@ public class GameUtils { boolean isInstalled = PackageUtils.isInstalledFromAllPackage(context, gameEntity.getSimulator().getApk().getPackageName()); if (isInstalled) { installCount++; + isRelatedEmulatorInstalled = true; } else { doneCount++; } } } } - if (installCount != 0) { + + if (isRelatedEmulatorInstalled && doneCount != 0) { return context.getString(R.string.launch); + } + + if (doneCount != 0) { + return context.getString(R.string.install); } else if (pluginCount != 0 && !SimulatorGameManager.isSimulatorGame(gameEntity)) { return context.getString(R.string.pluggable); } else if (updateCount != 0 && !SimulatorGameManager.isSimulatorGame(gameEntity)) { return context.getString(R.string.update); - } else if (doneCount != 0) { - return context.getString(R.string.install); + } else if (installCount != 0) { + return context.getString(R.string.launch); } else if (gameEntity.getVersionNumber().contains("无版号") && Config.isGameDomeSwitchOpen() && !SimulatorGameManager.isSimulatorGame(gameEntity)) { return context.getString(R.string.attempt); } else {