summaryrefslogtreecommitdiff
path: root/games/linux-ut/files/patch-bin__ut
diff options
context:
space:
mode:
Diffstat (limited to 'games/linux-ut/files/patch-bin__ut')
-rw-r--r--games/linux-ut/files/patch-bin__ut31
1 files changed, 31 insertions, 0 deletions
diff --git a/games/linux-ut/files/patch-bin__ut b/games/linux-ut/files/patch-bin__ut
new file mode 100644
index 000000000000..b14b86fa2164
--- /dev/null
+++ b/games/linux-ut/files/patch-bin__ut
@@ -0,0 +1,31 @@
+--- bin/ut.orig 2005-03-01 03:04:02.000000000 -0600
++++ bin/ut 2009-06-14 17:05:12.000000000 -0500
+@@ -68,6 +68,18 @@
+ cd $GAME_DIR
+ cd $SUBDIR
+
++# The Nvidia driver needs this to prevent the speed from being too fast when
++# facing things such as walls.
++sysctl hw.nvidia.version > /dev/null 2>&1
++if [ ${?} -eq 0 ]
++then
++ export __GL_SYNC_TO_VBLANK=${__GL_SYNC_TO_VBLANK:-"1"}
++fi
++
++# This is needed to prevent the following error:
++# XDM authorization key matches an existing client
++export LD_PRELOAD=/usr/lib/libX11.so.6
++
+ LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$PWD
+ export LD_LIBRARY_PATH
+
+@@ -75,6 +87,9 @@
+ ./$GAME_BINARY "$CMD_ARGS" "$@"
+ EXITCODE="$?"
+
++# Remove the preload before running any other command.
++unset LD_PRELOAD
++
+ # reset kb layout
+ setxkbmap
+