aboutsummaryrefslogtreecommitdiff
path: root/launcher/minecraft/launch/ExtractNatives.cpp
diff options
context:
space:
mode:
authorSefa Eyeoglu <contact@scrumplex.net>2023-08-02 13:47:50 +0200
committerSefa Eyeoglu <contact@scrumplex.net>2023-08-15 10:51:48 +0200
commit4c446ccd500f7a0bc136b66b554fd7880c6f5168 (patch)
tree91d78a57bcf0bee3fadafe7b172be8d631c8976e /launcher/minecraft/launch/ExtractNatives.cpp
parent83aa0062c7d831ca42ed4d82e5f6162ac8793be8 (diff)
downloadPrismLauncher-4c446ccd500f7a0bc136b66b554fd7880c6f5168.tar.gz
PrismLauncher-4c446ccd500f7a0bc136b66b554fd7880c6f5168.tar.bz2
PrismLauncher-4c446ccd500f7a0bc136b66b554fd7880c6f5168.zip
fix: remove meta OpenAL workaround
LWJGL 2 doesn't have a separate zip for OpenAL. So there is no reason for this code. Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
Diffstat (limited to 'launcher/minecraft/launch/ExtractNatives.cpp')
-rw-r--r--launcher/minecraft/launch/ExtractNatives.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/launcher/minecraft/launch/ExtractNatives.cpp b/launcher/minecraft/launch/ExtractNatives.cpp
index 1aa4dccc..8f3cac4d 100644
--- a/launcher/minecraft/launch/ExtractNatives.cpp
+++ b/launcher/minecraft/launch/ExtractNatives.cpp
@@ -39,7 +39,7 @@ static QString replaceSuffix(QString target, const QString& suffix, const QStrin
return target + replacement;
}
-static bool unzipNatives(QString source, QString targetFolder, bool applyJnilibHack, bool nativeOpenAL)
+static bool unzipNatives(QString source, QString targetFolder, bool applyJnilibHack)
{
QuaZip zip(source);
if (!zip.open(QuaZip::mdUnzip)) {
@@ -52,9 +52,6 @@ static bool unzipNatives(QString source, QString targetFolder, bool applyJnilibH
do {
QString name = zip.getCurrentFileName();
auto lowercase = name.toLower();
- if (nativeOpenAL && name.contains("openal")) {
- continue;
- }
if (applyJnilibHack) {
name = replaceSuffix(name, ".jnilib", ".dylib");
}
@@ -81,14 +78,11 @@ void ExtractNatives::executeTask()
}
auto settings = minecraftInstance->settings();
- // We only need OpenAL here, as modern versions of LWJGL (3+) are handled by JVM args, while older versions (2) didn't have GLFW
- bool nativeOpenAL = settings->get("UseNativeOpenAL").toBool();
-
auto outputPath = minecraftInstance->getNativePath();
auto javaVersion = minecraftInstance->getJavaVersion();
bool jniHackEnabled = javaVersion.major() >= 8;
for (const auto& source : toExtract) {
- if (!unzipNatives(source, outputPath, jniHackEnabled, nativeOpenAL)) {
+ if (!unzipNatives(source, outputPath, jniHackEnabled)) {
const char* reason = QT_TR_NOOP("Couldn't extract native jar '%1' to destination '%2'");
emit logLine(QString(reason).arg(source, outputPath), MessageLevel::Fatal);
emitFailed(tr(reason).arg(source, outputPath));