You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
calculate-overlay/games-util/steam-launcher/files/steam-fix-joystick-detectio...

20 lines
606 B

diff -Naur a/steam b/steam
--- a/steam 2016-08-14 18:44:23.069675427 +0100
+++ b/steam 2016-10-04 12:52:42.144904337 +0100
@@ -38,6 +38,15 @@
# Gentoo's lsb-release doesn't set this.
export DISTRIB_RELEASE="2.2"
+# Finds joystick devices so we can coerce Steam's old SDL library into using them
+IFS=$'\n'
+for f in $(find /dev/input -maxdepth 1 -type c | sort --version-sort); do
+ if udevadm info --query=property --name="$f" 2>/dev/null | grep --quiet ID_INPUT_JOYSTICK=1; then
+ export SDL_JOYSTICK_DEVICE+=${SDL_JOYSTICK_DEVICE+:}$f
+ fi
+done
+unset IFS
+
function show_message()
{
style=$1