mirror of
https://github.com/flightlessmango/MangoHud.git
synced 2024-11-11 19:10:55 +00:00
fix electron apps like minecraft-launcher
This commit is contained in:
parent
5912cce19f
commit
e99284aadd
@ -20,7 +20,9 @@ static void* get_egl_proc_address(const char* name) {
|
||||
void *func = nullptr;
|
||||
static void *(*pfn_eglGetProcAddress)(const char*) = nullptr;
|
||||
if (!pfn_eglGetProcAddress) {
|
||||
void *handle = real_dlopen("libEGL.so.1", RTLD_LAZY|RTLD_LOCAL);
|
||||
void *handle = real_dlopen("libEGL.so", RTLD_LAZY);
|
||||
if (!handle)
|
||||
handle = real_dlopen("libEGL.so.1", RTLD_LAZY);
|
||||
if (!handle) {
|
||||
SPDLOG_ERROR("Failed to open " MANGOHUD_ARCH " libEGL.so.1: {}", dlerror());
|
||||
} else {
|
||||
|
@ -107,12 +107,7 @@ EXPORT_C_(void) glXDestroyContext(void *dpy, void *ctx)
|
||||
EXPORT_C_(int) glXMakeCurrent(void* dpy, void* drawable, void* ctx) {
|
||||
glx.Load();
|
||||
SPDLOG_DEBUG("{}: {}, {}", __func__, drawable, ctx);
|
||||
int ret = 0;
|
||||
// This is hack, proper fix should be implemented.
|
||||
// MakeCurrent fails on the minecraft-launcher so we
|
||||
// just bypass it and minecraft hooking works as it should
|
||||
if (get_program_name() != "minecraft-launcher")
|
||||
ret = glx.MakeCurrent(dpy, drawable, ctx);
|
||||
int ret = glx.MakeCurrent(dpy, drawable, ctx);
|
||||
|
||||
if (!is_blacklisted()) {
|
||||
if (ret) {
|
||||
|
Loading…
Reference in New Issue
Block a user