Skip to content

Commit 4e38965

Browse files
authored
emulationstation: use SDL2 wayland videodriver if applicable
If a Gnome or Weston Wayland session is started under Ubuntu 22.04, SDL2 falls back to x11 videodriver. There is ARM hardware which runs much faster and without graphical glitches if the SDL2 wayland video driver is used. To prevent SDL2 from using x11 video driver, export "SDL_VIDEODRIVER=wayland" if Wayland session is detected.
1 parent 058f096 commit 4e38965

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

scriptmodules/supplementary/emulationstation.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,9 @@ if [[ "\$(uname --machine)" != *86* ]]; then
245245
fi
246246
fi
247247
248+
# use SDL2 wayland video driver if wayland session is detected
249+
[[ "$XDG_SESSION_TYPE" == "wayland" ]] && export SDL_VIDEODRIVER=wayland
250+
248251
# save current tty/vt number for use with X so it can be launched on the correct tty
249252
TTY=\$(tty)
250253
export TTY="\${TTY:8:1}"

0 commit comments

Comments
 (0)