Allow use cato on Windows on ARM

This commit is contained in:
Glavo
2021-10-14 04:14:21 +08:00
committed by Yuhui Huang
parent f662e983a4
commit 21a9d19105

View File

@@ -228,7 +228,8 @@ public final class MultiplayerManager {
public static String getCatoPath() { public static String getCatoPath() {
switch (OperatingSystem.CURRENT_OS) { switch (OperatingSystem.CURRENT_OS) {
case WINDOWS: case WINDOWS:
if (Architecture.SYSTEM_ARCH == Architecture.X86_64) { if (Architecture.SYSTEM_ARCH == Architecture.X86_64
|| (Architecture.SYSTEM_ARCH == Architecture.ARM64 && OperatingSystem.SYSTEM_BUILD_NUMBER >= 21277)) {
return "cato/cato/" + MultiplayerManager.CATO_VERSION + "/cato-windows-amd64.exe"; return "cato/cato/" + MultiplayerManager.CATO_VERSION + "/cato-windows-amd64.exe";
} else { } else {
return ""; return "";
@@ -478,7 +479,7 @@ public final class MultiplayerManager {
public static class ConnectionErrorException extends RuntimeException { public static class ConnectionErrorException extends RuntimeException {
} }
public static class CatoNotExistsException extends RuntimeException { public static class CatoNotExistsException extends RuntimeException {
private final Path file; private final Path file;