Made sure mangoHub libs are present
Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
parent
403c4bad86
commit
e4fecd1f97
@ -585,11 +585,17 @@ QProcessEnvironment MinecraftInstance::createLaunchEnvironment()
|
|||||||
auto mangoHudLibString = MangoHud::getLibraryString();
|
auto mangoHudLibString = MangoHud::getLibraryString();
|
||||||
if (!mangoHudLibString.isEmpty()) {
|
if (!mangoHudLibString.isEmpty()) {
|
||||||
QFileInfo mangoHudLib(mangoHudLibString);
|
QFileInfo mangoHudLib(mangoHudLibString);
|
||||||
|
QString libPath = mangoHudLib.absolutePath();
|
||||||
|
auto appendLib = [libPath, &preloadList](QString fileName) {
|
||||||
|
if (QFileInfo(FS::PathCombine(libPath, fileName)).exists())
|
||||||
|
preloadList << fileName;
|
||||||
|
};
|
||||||
|
|
||||||
// dlsym variant is only needed for OpenGL and not included in the vulkan layer
|
// dlsym variant is only needed for OpenGL and not included in the vulkan layer
|
||||||
preloadList << "libMangoHud_dlsym.so"
|
appendLib("libMangoHud_dlsym.so");
|
||||||
<< "libMangoHud_opengl.so" << mangoHudLib.fileName();
|
appendLib("libMangoHud_opengl.so");
|
||||||
libPaths << mangoHudLib.absolutePath();
|
appendLib(mangoHudLib.fileName());
|
||||||
|
libPaths << libPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
env.insert("LD_PRELOAD", preloadList.join(QLatin1String(":")));
|
env.insert("LD_PRELOAD", preloadList.join(QLatin1String(":")));
|
||||||
|
Loading…
Reference in New Issue
Block a user