mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-06-13 05:37:42 +02:00
mangohud support: getLibraryString should return absolute path when possible
Some distros ship MangoHub vulkan layer json with bare shared object name instead of an absolute path. This breaks environment config as `MinecraftInstance::createLaunchEnvironment()` seems to require absolute path of `libMangoHud.so`. Since we already have `MangoHud::findLibrary()` lying around, use that to figure out where `libMangoHud.so` really is. In case of a platform that doesn't support `dlopen()`, fallback to old behavior and return the path verbatim as it is recorded in vk layer json. Signed-off-by: Tianhao Chai <cth451@gmail.com>
This commit is contained in:
@ -608,7 +608,7 @@ QProcessEnvironment MinecraftInstance::createLaunchEnvironment()
|
||||
// dlsym variant is only needed for OpenGL and not included in the vulkan layer
|
||||
appendLib("libMangoHud_dlsym.so");
|
||||
appendLib("libMangoHud_opengl.so");
|
||||
appendLib(mangoHudLib.fileName());
|
||||
preloadList << mangoHudLibString;
|
||||
}
|
||||
|
||||
env.insert("LD_PRELOAD", preloadList.join(QLatin1String(":")));
|
||||
|
Reference in New Issue
Block a user