chore: replace naive mangohud detection with vulkan layer detection

Signed-off-by: Jan200101 <sentrycraft123@gmail.com>
This commit is contained in:
Jan200101
2022-12-11 11:01:33 +01:00
parent 514e7ae6a0
commit 2c1e887c8d
4 changed files with 129 additions and 11 deletions

View File

@ -125,6 +125,7 @@
#ifdef Q_OS_LINUX
#include <dlfcn.h>
#include "gamemode_client.h"
#include "MangoHud.h"
#endif
@ -1519,17 +1520,8 @@ void Application::updateCapabilities()
if (gamemode_query_status() >= 0)
m_capabilities |= SupportsGameMode;
{
void *dummy = dlopen("libMangoHud_dlsym.so", RTLD_LAZY);
// try normal variant as well
if (dummy == NULL)
dummy = dlopen("libMangoHud.so", RTLD_LAZY);
if (dummy != NULL) {
dlclose(dummy);
m_capabilities |= SupportsMangoHud;
}
}
if (!MangoHud::getLibraryString().isEmpty())
m_capabilities |= SupportsMangoHud;
#endif
}