From 56b227f4674d7683fce6ebe432a7eaa5d766f4ea Mon Sep 17 00:00:00 2001 From: zkitefly Date: Fri, 16 Jun 2023 08:17:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=96=B0=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=EF=BC=9A=E7=89=A9=E7=90=86=E5=86=85=E5=AD=98?= =?UTF-8?q?=E5=A4=A7=E5=B0=8F=20(#2279)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/org/jackhuang/hmcl/ui/GameCrashWindow.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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 796c0b202..79811bb7e 100644 --- a/HMCL/src/main/java/org/jackhuang/hmcl/ui/GameCrashWindow.java +++ b/HMCL/src/main/java/org/jackhuang/hmcl/ui/GameCrashWindow.java @@ -73,6 +73,7 @@ import static org.jackhuang.hmcl.util.i18n.I18n.i18n; public class GameCrashWindow extends Stage { private final Version version; private final String memory; + private final String total_memory; private final String java; private final LibraryAnalyzer analyzer; private final StringProperty os = new SimpleStringProperty(OperatingSystem.SYSTEM_NAME); @@ -100,6 +101,8 @@ public class GameCrashWindow extends Stage { memory = Optional.ofNullable(launchOptions.getMaxMemory()).map(i -> i + " MB").orElse("-"); + total_memory = Optional.ofNullable(OperatingSystem.TOTAL_MEMORY).map(i -> i + " MB").orElse("-"); + this.java = launchOptions.getJava().getArchitecture() == Architecture.SYSTEM_ARCH ? launchOptions.getJava().getVersion() : launchOptions.getJava().getVersion() + " (" + launchOptions.getJava().getArchitecture().getDisplayName() + ")"; @@ -292,6 +295,11 @@ public class GameCrashWindow extends Stage { version.setTitle(i18n("archive.game_version")); version.setSubtitle(GameCrashWindow.this.version.getId()); + TwoLineListItem total_memory = new TwoLineListItem(); + total_memory.getStyleClass().setAll("two-line-item-second-large"); + total_memory.setTitle(i18n("settings.physical_memory")); + total_memory.setSubtitle(GameCrashWindow.this.total_memory); + TwoLineListItem memory = new TwoLineListItem(); memory.getStyleClass().setAll("two-line-item-second-large"); memory.setTitle(i18n("settings.memory")); @@ -312,7 +320,7 @@ public class GameCrashWindow extends Stage { arch.setTitle(i18n("system.architecture")); arch.subtitleProperty().bind(GameCrashWindow.this.arch); - infoPane.getChildren().setAll(launcher, version, memory, java, os, arch); + infoPane.getChildren().setAll(launcher, version, total_memory, memory, java, os, arch); } HBox moddedPane = new HBox(8);