Skip to content

Commit 88dafca

Browse files
committed
emulationstation: modify wayland detection
I have done some tests running weston/wayland from CLI with a rpi4/raspbian-lite. After startup of weston $XDG_SESSION_TYPE is still "tty". If I start a weston/wayland session with graphical login (display manager sddm or gdm3) $XDG_SESSION_TYPE is "wayland". $WAYLAND_DISPLAY can be found in both constellations and seems to be more reliable. On a rpi4 $WAYLAND_DISPLAY=wayland-0. Just replace $XDG_SESSION_TYPE with $WAYLAND_DISPLAY.
1 parent abd614a commit 88dafca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scriptmodules/supplementary/emulationstation.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ if [[ "\$(uname --machine)" != *86* ]]; then
257257
fi
258258
259259
# use SDL2 wayland video driver if wayland session is detected
260-
[[ "$XDG_SESSION_TYPE" == "wayland" ]] && export SDL_VIDEODRIVER=wayland
260+
[[ "\$WAYLAND_DISPLAY" == wayland* ]] && export SDL_VIDEODRIVER=wayland
261261
262262
# save current tty/vt number for use with X so it can be launched on the correct tty
263263
TTY=\$(tty)

0 commit comments

Comments
 (0)