opnsense-ports/games/linux-ut/files/patch-bin__ut
Franco Fichtner 8cb1a96ede ports: pull in a snapshot of the FreeBSD ports tree
Taken from:	https://github.com/freebsd/freebsd-ports.git
Commit id:	5070672073b68be364139bc6b3a89100bd17d331
2014-11-09 14:03:21 +01:00

31 lines
778 B
Text

--- 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