gamescope: SDL backend on Wayland for reliable streamed input #4

Merged
gabrielgad merged 1 commit from feature/gamescope-sdl-wayland into main 2026-06-16 20:00:24 -04:00
gabrielgad commented 2026-06-16 19:58:02 -04:00 (Migrated from github.com)

The gamescope_sdl_backend config (default true) was gated to X11 sessions only via !is_wayland_session(), so it was a silent no-op on Wayland/niri.

On a Wayland session the default headless-wayland gamescope backend does not cleanly take input injected by a remote-streaming host (Sunshine/Moonlight) — menu clicks die. The SDL backend (gamescope owns an SDL/XWayland window) takes that input correctly — which is exactly what Lutris uses by default.

This honors gamescope_sdl_backend on Wayland too, and sets SDL_VIDEODRIVER=x11 (XWayland) for the SDL backend on Wayland (setup_env runs before add_args, so the re-set wins). Validated on Orebound under Moonlight: menu input went from dead → working.

Note: users who prefer the wayland backend can set gamescope_sdl_backend: false.

The `gamescope_sdl_backend` config (default true) was gated to X11 sessions only via `!is_wayland_session()`, so it was a silent no-op on Wayland/niri. On a Wayland session the default headless-wayland gamescope backend does **not** cleanly take input injected by a remote-streaming host (Sunshine/Moonlight) — menu clicks die. The **SDL backend** (gamescope owns an SDL/XWayland window) takes that input correctly — which is exactly what Lutris uses by default. This honors `gamescope_sdl_backend` on Wayland too, and sets `SDL_VIDEODRIVER=x11` (XWayland) for the SDL backend on Wayland (`setup_env` runs before `add_args`, so the re-set wins). Validated on Orebound under Moonlight: menu input went from dead → working. Note: users who prefer the wayland backend can set `gamescope_sdl_backend: false`.
Sign in to join this conversation.
No description provided.