Rename 'Platform' to 'Bits'

This commit is contained in:
Glavo
2021-10-13 20:06:09 +08:00
committed by Yuhui Huang
parent 2852821d2c
commit 9b6f2d00ca
7 changed files with 27 additions and 27 deletions

View File

@@ -432,13 +432,13 @@ public final class LauncherHelper {
}
}
if (javaVersion.getPlatform() != Architecture.SYSTEM.getPlatform()) {
if (javaVersion.getPlatform() != Architecture.SYSTEM.getBits()) {
Controllers.dialog(i18n("launch.advice.different_platform"), i18n("message.warning"), MessageType.ERROR, continueAction);
suggested = true;
}
// 32-bit JVM cannot make use of too much memory.
if (javaVersion.getPlatform() == org.jackhuang.hmcl.util.platform.Platform.BIT_32 &&
if (javaVersion.getPlatform() == Bits.BIT_32 &&
setting.getMaxMemory() > 1.5 * 1024) {
// 1.5 * 1024 is an inaccurate number.
// Actual memory limit depends on operating system and memory.

View File

@@ -608,7 +608,7 @@ public final class VersionSetting implements Cloneable {
if (checkJava)
return JavaVersion.fromExecutable(Paths.get(getJavaDir()));
else
return new JavaVersion(Paths.get(getJavaDir()), "", Architecture.SYSTEM.getPlatform());
return new JavaVersion(Paths.get(getJavaDir()), "", Architecture.SYSTEM.getBits());
} catch (IOException | InvalidPathException e) {
return null; // Custom Java Directory not found,
}