Skip to content
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

Add OpenGL Shim #1503

Merged

Conversation

Etaash-mathamsetty
Copy link
Contributor

No description provided.

src/gl/shim.c Outdated Show resolved Hide resolved
src/meson.build Outdated Show resolved Hide resolved
@Etaash-mathamsetty Etaash-mathamsetty force-pushed the opengl-shim2 branch 3 times, most recently from 9f5cb9d to b2d20ba Compare December 24, 2024 16:49
flightlessmango and others added 2 commits December 24, 2024 11:52
Since this library is preloaded, it will be preloaded into any arbitrary
application in the way to the program/game. When one of these applications
share dependencies with mangohud and they use different version of the library
which are incompatible, a crash happens.
To resolve this we create a shim library that only depends on libc.
The shim preloads and hooks opengl swapbuffers and then loads mangohud.
If there is no swapbuffers, there's no opengl context and no reason to load mangohud.
This way we don't preload into arbitrary applications and prevent crashing.
@Etaash-mathamsetty Etaash-mathamsetty force-pushed the opengl-shim2 branch 2 times, most recently from 85ecc3d to b05cecf Compare December 24, 2024 16:59
@flightlessmango flightlessmango merged commit 5559616 into flightlessmango:master Dec 26, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants