diff options
author | Sefa Eyeoglu <contact@scrumplex.net> | 2023-08-02 13:56:23 +0200 |
---|---|---|
committer | Sefa Eyeoglu <contact@scrumplex.net> | 2023-08-15 10:52:08 +0200 |
commit | c2d6a137aba6d41df709c73096f4521df3779304 (patch) | |
tree | ac464fe044adbf82fd30c81daefe13aa24464778 /launcher | |
parent | b927e58126440d735803251caa3e03d29e4a0547 (diff) | |
download | PrismLauncher-c2d6a137aba6d41df709c73096f4521df3779304.tar.gz PrismLauncher-c2d6a137aba6d41df709c73096f4521df3779304.tar.bz2 PrismLauncher-c2d6a137aba6d41df709c73096f4521df3779304.zip |
fix: only add native library overrides if files exist
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
Diffstat (limited to 'launcher')
-rw-r--r-- | launcher/minecraft/MinecraftInstance.cpp | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/launcher/minecraft/MinecraftInstance.cpp b/launcher/minecraft/MinecraftInstance.cpp index bfc4ad98..62d22019 100644 --- a/launcher/minecraft/MinecraftInstance.cpp +++ b/launcher/minecraft/MinecraftInstance.cpp @@ -397,22 +397,25 @@ QStringList MinecraftInstance::extraArguments() QString glfwPath; if (settings()->get("UseNativeOpenAL").toBool()) { - auto customPath = settings()->get("CustomOpenALPath").toString(); openALPath = APPLICATION->m_detectedOpenALPath; + auto customPath = settings()->get("CustomOpenALPath").toString(); if (!customPath.isEmpty()) openALPath = customPath; } if (settings()->get("UseNativeGLFW").toBool()) { - auto customPath = settings()->get("CustomGLFWPath").toString(); glfwPath = APPLICATION->m_detectedGLFWPath; + auto customPath = settings()->get("CustomGLFWPath").toString(); if (!customPath.isEmpty()) glfwPath = customPath; } - if (!openALPath.isEmpty()) - list.append("-Dorg.lwjgl.openal.libname=" + openALPath); - if (!glfwPath.isEmpty()) - list.append("-Dorg.lwjgl.glfw.libname=" + glfwPath); + QFileInfo openALInfo(openALPath); + QFileInfo glfwInfo(glfwPath); + + if (!openALPath.isEmpty() && openALInfo.exists()) + list.append("-Dorg.lwjgl.openal.libname=" + openALInfo.absoluteFilePath()); + if (!glfwPath.isEmpty() && glfwInfo.exists()) + list.append("-Dorg.lwjgl.glfw.libname=" + glfwInfo.absoluteFilePath()); } return list; |