Rename 'Platform' to 'Bits'
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user