fix(bionic): read the DD_ setting names main uses since #2800

The launcher read BL_SYNC, BL_FSYNC_FIRST, BL_SYNC_FALLBACK and BL_VK_DRIVER and kept
BL_WIDTH/BL_HEIGHT; main sends these as DD_*. Read DD_* first and keep BL_* as a
fallback, so a tool build works with app builds from before and after the rename.
The Steam install-script test uses dd_components / DD_COMPONENTS_SETUP.
This commit is contained in:
The412Banner committed 2026-11-18 19:58:18 -05:00
1 parent c887aa1cd2
commit c1cd433cb2
2 files changed
+11 -7

No files matched your search

+10 -6
View File
@@ -27,11 +27,12 @@ for v in $(env | sed -n 's/^\([A-Za-z_][A-Za-z0-9_]*\)=.*/\1/p'); do
case "$v" in
SteamAppId|SteamGameId|SteamOverlayGameId|SteamClientLaunch|SteamEnv|SteamAppUser|SteamUser|STEAM_COMPAT_*) ;;
ANDROID_*|BOOTCLASSPATH|DEX2OATBOOTCLASSPATH|SYSTEMSERVERCLASSPATH|EXTERNAL_STORAGE|ASEC_MOUNTPOINT) ;;
FAKE_*|SDL_*|BL_WIDTH|BL_HEIGHT|BL_VK_DRIVER|WINEDLLOVERRIDES) ;;
FAKE_*|SDL_*|DD_WIDTH|DD_HEIGHT|DD_VK_DRIVER|BL_WIDTH|BL_HEIGHT|BL_VK_DRIVER|WINEDLLOVERRIDES) ;;
DISPLAY|GAMESCOPE_WAYLAND_DISPLAY|FEX_*) ;;
TU_DEBUG|MESA_NO_ERROR|DXVK_CONFIG|DXVK_HUD|DROIDDECK_FORCE_SSBS) ;;
mesa_glthread|vblank_mode|ZINK_*|GALLIUM_HUD|GALLIUM_THREAD) ;;
BL_SYNC|BL_FSYNC_FIRST|BL_SYNC_FALLBACK|PROTON_NO_ESYNC|PROTON_NO_FSYNC|PROTON_NO_NTSYNC|WINEESYNC) ;;
DD_SYNC|DD_FSYNC_FIRST|DD_SYNC_FALLBACK|BL_SYNC|BL_FSYNC_FIRST|BL_SYNC_FALLBACK) ;;
PROTON_NO_ESYNC|PROTON_NO_FSYNC|PROTON_NO_NTSYNC|WINEESYNC) ;;
PROTON_USE_D7VK) ;;
WINE_OFFSCREEN_CHECK_MS|WINE_CPU_TOPOLOGY|WINE_LARGE_ADDRESS_AWARE|TZ) ;;
DXVK_LOG_LEVEL|DXVK_HDR|VKD3D_DEBUG|VKD3D_SHADER_DEBUG) ;;
@@ -53,7 +54,7 @@ drvlib() { # an Android driver folder's library: meta.json's libraryName, else l
l=$(sed -n 's/.*"libraryName"[[:space:]]*:[[:space:]]*"\([^"/]*\)".*/\1/p' "$1/meta.json" 2>/dev/null | head -1)
echo "${l:-libvulkan_freedreno.so}"
}
DRV=$(basename "$(dirname "${BL_VK_DRIVER:-/x/none/icd.json}")")
DRV=$(basename "$(dirname "${DD_VK_DRIVER:-${BL_VK_DRIVER:-/x/none/icd.json}}")")
DRVDIR=$APP/graphics_driver/$DRV
if [ ! -f "$DRVDIR/$(drvlib "$DRVDIR")" ]; then
# The runtime driver has no Android build: the one DroidDeck's display uses, else the first one installed.
@@ -80,10 +81,13 @@ export WINEDLLOVERRIDES="${WINEDLLOVERRIDES:+$WINEDLLOVERRIDES;}d3d8,d3d9,d3d10c
# Sync as chosen in DroidDeck (Wine sync, per-game PROTON_NO_*): ntsync is userspace ntsync (no /dev/ntsync on
# Android) with esync as its fallback; Android has no futex_waitv, so an fsync choice runs ntsync.
on() { case "$1" in 1|on|true|yes) return 0 ;; esac; return 1; }
# DroidDeck builds before #2800 send these settings as BL_*, newer ones as DD_*.
SYNC=${DD_SYNC:-${BL_SYNC:-1}}; FSYNC_FIRST=${DD_FSYNC_FIRST:-${BL_FSYNC_FIRST:-0}}
SYNC_FALLBACK=${DD_SYNC_FALLBACK:-${BL_SYNC_FALLBACK:-1}}
NT=1; ES=1
[ "${BL_SYNC:-1}" = 0 ] && NT=0
[ "${BL_FSYNC_FIRST:-0}" = 1 ] && NT=1
[ "${BL_SYNC:-1}" = 0 ] && [ "${BL_SYNC_FALLBACK:-1}" = 0 ] && ES=0
[ "$SYNC" = 0 ] && NT=0
[ "$FSYNC_FIRST" = 1 ] && NT=1
[ "$SYNC" = 0 ] && [ "$SYNC_FALLBACK" = 0 ] && ES=0
on "${PROTON_NO_NTSYNC:-}" && NT=0
{ on "${PROTON_NO_ESYNC:-}" || [ "${WINEESYNC:-}" = 0 ]; } && ES=0
export WINENTSYNC=$NT WINEESYNC=$ES
+1 -1
View File
@@ -1475,7 +1475,7 @@ class GameEnvironmentTest(unittest.TestCase):
rows += [row("43", tool, unix, android), row("43", tool, dll, android_dll)]
rows += [row("*", tool, unix, saved)]
(component_dir / "desired.tsv").write_text("".join(rows))
script = COMPAT["BL_COMPONENTS_SETUP"] + '\nverb=waitforexitandrun; bl_components "$1"\n'
script = COMPAT["DD_COMPONENTS_SETUP"] + '\nverb=waitforexitandrun; dd_components "$1"\n'
run = lambda tool, app: subprocess.run(
["bash", "-c", script, "test", str(root / tool)], check=True, capture_output=True,
env=dict(os.environ, HOME=str(home), STEAM_COMPAT_DATA_PATH="/steam/compatdata/" + app))