mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-12 19:41:10 +00:00
Three things kept Valve's mangoapp from drawing the overlay in a session: - GLFW 3.4 takes XDG_SESSION_TYPE=wayland with WAYLAND_DISPLAY set as Wayland-only, and mangoapp needs gamescope's X server; the wrapper sets XDG_SESSION_TYPE=x11. - On a Qualcomm display driver it opens a tracefs instance for the GPU memory total and aborts when that fails, which it always does for an Android app. The session preload now places the instance in an empty directory of its own when the real one cannot be made. - gamescope sends it each frame's timings through a System V message queue, and Android kernels have no System V IPC. sysv.c now emulates the queue operations gamescope and mangoapp use, beside its semaphores and shared memory.
9 lines
646 B
Bash
9 lines
646 B
Bash
#!/bin/sh
|
|
# gamescope --mangoapp runs `mangoapp` from PATH; this puts Valve's build beside the libraries the
|
|
# runtime lacks (fmt 10, spdlog 1.13, glfw, libtracefs, libtraceevent), staged by the app.
|
|
# mangoapp reads its window through GLFW's X11 API. GLFW 3.4 takes XDG_SESSION_TYPE=wayland with a
|
|
# WAYLAND_DISPLAY as Wayland-only, and unset, libwayland falls back to wayland-0 - DroidDeck's own
|
|
# compositor, which shares XDG_RUNTIME_DIR - so both fail; x11 makes GLFW use gamescope's X server.
|
|
export XDG_SESSION_TYPE=x11
|
|
LD_LIBRARY_PATH=/usr/local/lib/mangoapp${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} exec /usr/local/lib/mangoapp/mangoapp "$@"
|