diff options
Diffstat (limited to 'src/contrib/SDL-3.2.20/docs/README-linux.md')
-rw-r--r-- | src/contrib/SDL-3.2.20/docs/README-linux.md | 98 |
1 files changed, 98 insertions, 0 deletions
diff --git a/src/contrib/SDL-3.2.20/docs/README-linux.md b/src/contrib/SDL-3.2.20/docs/README-linux.md new file mode 100644 index 0000000..3f2d2c0 --- /dev/null +++ b/src/contrib/SDL-3.2.20/docs/README-linux.md | |||
@@ -0,0 +1,98 @@ | |||
1 | Linux | ||
2 | ================================================================================ | ||
3 | |||
4 | By default SDL will only link against glibc, the rest of the features will be | ||
5 | enabled dynamically at runtime depending on the available features on the target | ||
6 | system. So, for example if you built SDL with XRandR support and the target | ||
7 | system does not have the XRandR libraries installed, it will be disabled | ||
8 | at runtime, and you won't get a missing library error, at least with the | ||
9 | default configuration parameters. | ||
10 | |||
11 | |||
12 | Build Dependencies | ||
13 | -------------------------------------------------------------------------------- | ||
14 | |||
15 | Ubuntu 18.04, all available features enabled: | ||
16 | |||
17 | sudo apt-get install build-essential git make \ | ||
18 | pkg-config cmake ninja-build gnome-desktop-testing libasound2-dev libpulse-dev \ | ||
19 | libaudio-dev libjack-dev libsndio-dev libx11-dev libxext-dev \ | ||
20 | libxrandr-dev libxcursor-dev libxfixes-dev libxi-dev libxss-dev \ | ||
21 | libxkbcommon-dev libdrm-dev libgbm-dev libgl1-mesa-dev libgles2-mesa-dev \ | ||
22 | libegl1-mesa-dev libdbus-1-dev libibus-1.0-dev libudev-dev | ||
23 | |||
24 | Ubuntu 22.04+ can also add `libpipewire-0.3-dev libwayland-dev libdecor-0-dev liburing-dev` to that command line. | ||
25 | |||
26 | Fedora 35, all available features enabled: | ||
27 | |||
28 | sudo yum install gcc git-core make cmake \ | ||
29 | alsa-lib-devel pulseaudio-libs-devel nas-devel pipewire-devel \ | ||
30 | libX11-devel libXext-devel libXrandr-devel libXcursor-devel libXfixes-devel \ | ||
31 | libXi-devel libXScrnSaver-devel dbus-devel ibus-devel \ | ||
32 | systemd-devel mesa-libGL-devel libxkbcommon-devel mesa-libGLES-devel \ | ||
33 | mesa-libEGL-devel vulkan-devel wayland-devel wayland-protocols-devel \ | ||
34 | libdrm-devel mesa-libgbm-devel libusb-devel libdecor-devel \ | ||
35 | pipewire-jack-audio-connection-kit-devel \ | ||
36 | |||
37 | Fedora 39+ can also add `liburing-devel` to that command line. | ||
38 | |||
39 | NOTES: | ||
40 | - The sndio audio target is unavailable on Fedora (but probably not what you | ||
41 | should want to use anyhow). | ||
42 | |||
43 | openSUSE Tumbleweed: | ||
44 | |||
45 | sudo zypper in libunwind-devel libusb-1_0-devel Mesa-libGL-devel libxkbcommon-devel libdrm-devel \ | ||
46 | libgbm-devel pipewire-devel libpulse-devel sndio-devel Mesa-libEGL-devel | ||
47 | |||
48 | Arch: | ||
49 | sudo pacman -S alsa-lib cmake hidapi ibus jack libdecor libgl libpulse libusb libx11 libxcursor libxext libxinerama libxkbcommon libxrandr libxrender libxss mesa ninja pipewire sndio vulkan-driver vulkan-headers wayland wayland-protocols | ||
50 | |||
51 | |||
52 | Joystick does not work | ||
53 | -------------------------------------------------------------------------------- | ||
54 | |||
55 | If you compiled or are using a version of SDL with udev support (and you should!) | ||
56 | there's a few issues that may cause SDL to fail to detect your joystick. To | ||
57 | debug this, start by installing the evtest utility. On Ubuntu/Debian: | ||
58 | |||
59 | sudo apt-get install evtest | ||
60 | |||
61 | Then run: | ||
62 | |||
63 | sudo evtest | ||
64 | |||
65 | You'll hopefully see your joystick listed along with a name like "/dev/input/eventXX" | ||
66 | Now run: | ||
67 | |||
68 | cat /dev/input/event/XX | ||
69 | |||
70 | If you get a permission error, you need to set a udev rule to change the mode of | ||
71 | your device (see below) | ||
72 | |||
73 | Also, try: | ||
74 | |||
75 | sudo udevadm info --query=all --name=input/eventXX | ||
76 | |||
77 | If you see a line stating ID_INPUT_JOYSTICK=1, great, if you don't see it, | ||
78 | you need to set up an udev rule to force this variable. | ||
79 | |||
80 | A combined rule for the Saitek Pro Flight Rudder Pedals to fix both issues looks | ||
81 | like: | ||
82 | |||
83 | SUBSYSTEM=="input", ATTRS{idProduct}=="0763", ATTRS{idVendor}=="06a3", MODE="0666", ENV{ID_INPUT_JOYSTICK}="1" | ||
84 | SUBSYSTEM=="input", ATTRS{idProduct}=="0764", ATTRS{idVendor}=="06a3", MODE="0666", ENV{ID_INPUT_JOYSTICK}="1" | ||
85 | |||
86 | You can set up similar rules for your device by changing the values listed in | ||
87 | idProduct and idVendor. To obtain these values, try: | ||
88 | |||
89 | sudo udevadm info -a --name=input/eventXX | grep idVendor | ||
90 | sudo udevadm info -a --name=input/eventXX | grep idProduct | ||
91 | |||
92 | If multiple values come up for each of these, the one you want is the first one of each. | ||
93 | |||
94 | On other systems which ship with an older udev (such as CentOS), you may need | ||
95 | to set up a rule such as: | ||
96 | |||
97 | SUBSYSTEM=="input", ENV{ID_CLASS}=="joystick", ENV{ID_INPUT_JOYSTICK}="1" | ||
98 | |||