-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Doesn't work with Mangohud #38
Comments
I don't think so, both use |
Hmm, then maybe Steam is hooking the functions without dlsym. Also one thing to note, mangohud by default isn't using dlsym - you have to use |
You can try this diff --git a/src/glinject.c b/src/glinject.c
index e4b22a2..c9fb3c8 100644
--- a/src/glinject.c
+++ b/src/glinject.c
@@ -16,6 +16,8 @@ You should have received a copy of the GNU General Public License along
with this program. If not, see <https://www.gnu.org/licenses/>
*/
+#define _GNU_SOURCE
+
#include "glinject.h"
#include "capture.h"
#include "utils.h"
@@ -59,7 +61,10 @@ struct gl_data {
static struct gl_data data;
#define GETADDR(s, p, func) \
- p.func = (typeof(p.func))real_dlsym(handle, #s #func); \
+ p.func = (typeof(p.func))real_dlsym(RTLD_NEXT, #s #func); \
+ if (!p.func) { \
+ p.func = (typeof(p.func))real_dlsym(handle, #s #func); \
+ } \
if (!p.func) { \
hlog("Failed to resolve " #s #func); \
return false; \
Problem with this is that it makes mangohud + alacritty EGL crash. It will crash when trying to call GL functions obtained from mangohud's Honestly it's a mess. |
Any idea how Steam overlay is working fine with all these other hooks? 🤔 |
Not really, and of course there's no source code to look into. |
By the way, I tried |
Didn't make a difference when I tried myself either. With current |
Nice! I guess the perfect world scenario, where all OpenGL "overlay" applications work together no matter the order they are applied in, is impossible? 😄 Perhaps at some point we'll have a good translation layer to convert OpenGL calls to Vulkan on the fly, like DXVK does for DirectX 😄 (I wonder if Zink is in a working state for games yet?) |
Yes, there is no standard way how to do it with OpenGL, as it is with Vulkan. I've pushed another changes and it should now work fine with mangohud even for EGL. But I wonder what else will break. |
obs-glcapture
doesn't seem to work when used at the same time as Mangohud. Instead, the outermost invocation gets precedence. For example, when running a OpenGL Steam game like:Game capture works, but Mangohud doesn't work.
If I use:
Now Mangohud works, but game captures doesn't. (I just get a black screen.)
Is it possible to make them work at the same time?
The text was updated successfully, but these errors were encountered: