From 3bbe4224218e3bc26b5bdf713e7711d9470a8fac Mon Sep 17 00:00:00 2001 From: Glavo Date: Thu, 14 Oct 2021 21:53:54 +0800 Subject: [PATCH] When using Java with different architectures, display the Java architecture in the crash window --- .../java/org/jackhuang/hmcl/ui/GameCrashWindow.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/HMCL/src/main/java/org/jackhuang/hmcl/ui/GameCrashWindow.java b/HMCL/src/main/java/org/jackhuang/hmcl/ui/GameCrashWindow.java index 2ae391336..f3d7f2e33 100644 --- a/HMCL/src/main/java/org/jackhuang/hmcl/ui/GameCrashWindow.java +++ b/HMCL/src/main/java/org/jackhuang/hmcl/ui/GameCrashWindow.java @@ -39,10 +39,7 @@ import org.jackhuang.hmcl.ui.construct.TwoLineListItem; import org.jackhuang.hmcl.util.Lang; import org.jackhuang.hmcl.util.Log4jLevel; import org.jackhuang.hmcl.util.Pair; -import org.jackhuang.hmcl.util.platform.Architecture; -import org.jackhuang.hmcl.util.platform.CommandBuilder; -import org.jackhuang.hmcl.util.platform.ManagedProcess; -import org.jackhuang.hmcl.util.platform.OperatingSystem; +import org.jackhuang.hmcl.util.platform.*; import java.awt.*; import java.io.IOException; @@ -93,7 +90,10 @@ public class GameCrashWindow extends Stage { this.analyzer = LibraryAnalyzer.analyze(version); memory = Optional.ofNullable(launchOptions.getMaxMemory()).map(i -> i + " MB").orElse("-"); - java = launchOptions.getJava().getVersion(); + + this.java = launchOptions.getJava().getArchitecture() == Architecture.SYSTEM_ARCH + ? launchOptions.getJava().getVersion() + : launchOptions.getJava().getVersion() + " (" + launchOptions.getJava().getArchitecture().getDisplayName() + ")"; this.view = new View();