-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
51 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,42 @@ | ||
diff --git a/bin/mangohud.in b/bin/mangohud.in | ||
index 6c3c6e8..8847cdc 100755 | ||
index 53c72ef..3cc4f19 100755 | ||
--- a/bin/mangohud.in | ||
+++ b/bin/mangohud.in | ||
@@ -8,10 +8,10 @@ if [ "$#" -eq 0 ]; then | ||
exit 1 | ||
fi | ||
@@ -13,13 +13,13 @@ fi | ||
DISABLE_LD_PRELOAD="cs2.sh | ||
some_other_exe" | ||
|
||
-MANGOHUD_LIB_NAME="@ld_libdir_mangohud@libMangoHud_opengl.so" | ||
+MANGOHUD_LIB_NAME="libMangoHud_opengl.so" | ||
|
||
if [ "$1" = "--dlsym" ]; then | ||
- MANGOHUD_LIB_NAME="@ld_libdir_mangohud@libMangoHud_dlsym.so:${MANGOHUD_LIB_NAME}" | ||
+ MANGOHUD_LIB_NAME="libMangoHud_dlsym.so:${MANGOHUD_LIB_NAME}" | ||
shift | ||
- MANGOHUD_LIB_NAME="@ld_libdir_mangohud@libMangoHud_dlsym.so:${MANGOHUD_LIB_NAME}" | ||
+ MANGOHUD_LIB_NAME="libMangoHud_dlsym.so:${MANGOHUD_LIB_NAME}" | ||
shift # shift will only be executed if $1 is "--dlsym" | ||
elif [ "$MANGOHUD_DLSYM" = "1" ]; then | ||
- MANGOHUD_LIB_NAME="@ld_libdir_mangohud@libMangoHud_dlsym.so:${MANGOHUD_LIB_NAME}" | ||
+ MANGOHUD_LIB_NAME="libMangoHud_dlsym.so:${MANGOHUD_LIB_NAME}" | ||
fi | ||
|
||
@@ -31,5 +31,7 @@ case ":${LD_PRELOAD-}:" in | ||
LD_PRELOAD="${LD_PRELOAD:+$LD_PRELOAD:}${MANGOHUD_LIB_NAME}" | ||
esac | ||
if [ "$1" = "--version" ]; then | ||
@@ -40,8 +40,10 @@ for exe in $DISABLE_LD_PRELOAD; do | ||
fi | ||
done | ||
|
||
+LD_LIBRARY_PATH="@libraryPath@${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" | ||
+XDG_DATA_DIRS="@dataDir@${XDG_DATA_DIRS:+:$XDG_DATA_DIRS}" | ||
+ | ||
if [ "$disable_preload" = true ]; then | ||
- exec env MANGOHUD=1 "$@" | ||
+ exec env MANGOHUD=1 XDG_DATA_DIRS="${XDG_DATA_DIRS}" "$@" | ||
else | ||
# Make sure we don't append mangohud lib multiple times | ||
# otherwise, this could cause issues with the steam runtime | ||
@@ -54,5 +56,7 @@ else | ||
LD_PRELOAD="${LD_PRELOAD:+$LD_PRELOAD:}${MANGOHUD_LIB_NAME}" | ||
esac | ||
|
||
-exec env MANGOHUD=1 LD_PRELOAD="${LD_PRELOAD}" "$@" | ||
+exec env MANGOHUD=1 LD_PRELOAD="${LD_PRELOAD}" LD_LIBRARY_PATH="${LD_LIBRARY_PATH}" XDG_DATA_DIRS="${XDG_DATA_DIRS}" "$@" | ||
- exec env MANGOHUD=1 LD_PRELOAD="${LD_PRELOAD}" "$@" | ||
+ LD_LIBRARY_PATH="@libraryPath@${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" | ||
+ | ||
+ exec env MANGOHUD=1 LD_PRELOAD="${LD_PRELOAD}" LD_LIBRARY_PATH="${LD_LIBRARY_PATH}" XDG_DATA_DIRS="${XDG_DATA_DIRS}" "$@" | ||
fi |