aboutsummaryrefslogtreecommitdiff
path: root/launcher/RuntimeContext.h
diff options
context:
space:
mode:
authorSefa Eyeoglu <contact@scrumplex.net>2022-10-15 12:41:16 +0200
committerSefa Eyeoglu <contact@scrumplex.net>2022-10-15 12:41:16 +0200
commit545944cb0de33438b0584785a900045eb35ecd58 (patch)
tree482ad56aff72cb6ca03ffa939511b894ff92ff3c /launcher/RuntimeContext.h
parent19ee736e1d117a5da5f06740ee502d741fe01aa4 (diff)
downloadPrismLauncher-545944cb0de33438b0584785a900045eb35ecd58.tar.gz
PrismLauncher-545944cb0de33438b0584785a900045eb35ecd58.tar.bz2
PrismLauncher-545944cb0de33438b0584785a900045eb35ecd58.zip
refactor: support armhf
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
Diffstat (limited to 'launcher/RuntimeContext.h')
-rw-r--r--launcher/RuntimeContext.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/launcher/RuntimeContext.h b/launcher/RuntimeContext.h
index c1b71318..bc2ed5c8 100644
--- a/launcher/RuntimeContext.h
+++ b/launcher/RuntimeContext.h
@@ -29,9 +29,14 @@ struct RuntimeContext {
QString system;
QString mappedJavaRealArchitecture() const {
- if (javaRealArchitecture == "aarch64") {
+ if (javaRealArchitecture == "amd64")
+ return "x86_64";
+ if (javaRealArchitecture == "i386" || javaRealArchitecture == "i686")
+ return "x86";
+ if (javaRealArchitecture == "aarch64")
return "arm64";
- }
+ if (javaRealArchitecture == "arm" || javaRealArchitecture == "armhf")
+ return "arm32";
return javaRealArchitecture;
}
@@ -48,8 +53,8 @@ struct RuntimeContext {
// "Legacy" refers to the fact that Mojang assumed that these are the only two architectures
bool isLegacyArch() const {
- QSet<QString> legacyArchitectures{"amd64", "x86_64", "i386", "i686", "x86"};
- return legacyArchitectures.contains(mappedJavaRealArchitecture());
+ const QString mapped = mappedJavaRealArchitecture();
+ return mapped == "x86_64" || mapped == "x86";
}
bool classifierMatches(QString target) const {