mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 18:09:59 +03:00
fix: only add native library overrides if files exist
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
This commit is contained in:
parent
b927e58126
commit
c2d6a137ab
1 changed files with 9 additions and 6 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue