upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorBloh09 <104168236+Bloh09@users.noreply.github.com>2026-11-28 16:08:25 -0800
committerBloh09 <104168236+Bloh09@users.noreply.github.com>2026-11-28 17:31:06 -0800
commitbbbdba8c4b2824cda9a5329c3d455ec3ce655e46 (patch)
tree44e94a880fa96c19bc58e48e50526aaccfdc6355 /scripts
parentbf574cf31aea0aa17985c6a1da98d4a4e83a41c2 (diff)
run_game_wine.sh: lowercase the device ids with tr, not ${x,,}, so bash 3.2 matches the card (CI-RUN-GAME-WINE-BASH3)
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/run_game_wine.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/run_game_wine.sh b/scripts/run_game_wine.sh
index 9d8f19a37..cc60d6767 100755
--- a/scripts/run_game_wine.sh
+++ b/scripts/run_game_wine.sh
@@ -228,13 +228,14 @@ DRM_SYSFS=${LEONIDA_DRM_SYSFS_DIR:-/sys/class/drm}
228if [ -n "$DEVICE" ]; then 228if [ -n "$DEVICE" ]; then
229 export MESA_VK_DEVICE_SELECT="$DEVICE!" 229 export MESA_VK_DEVICE_SELECT="$DEVICE!"
230 # kwin and Xwayland's glamor on the card that renders, so the present path stays on one device. 230 # kwin and Xwayland's glamor on the card that renders, so the present path stays on one device.
231 dev_lc=${DEVICE,,} 231 lc() { printf '%s' "$1" | tr '[:upper:]' '[:lower:]'; } # not ${x,,}: macOS's bash 3.2 lacks it
232 dev_lc=$(lc "$DEVICE")
232 for n in "$DRM_SYSFS"/renderD*; do 233 for n in "$DRM_SYSFS"/renderD*; do
233 [ -e "$n" ] || continue 234 [ -e "$n" ] || continue
234 ven=$(cat "$n/device/vendor" 2>/dev/null || true) 235 ven=$(cat "$n/device/vendor" 2>/dev/null || true)
235 did=$(cat "$n/device/device" 2>/dev/null || true) 236 did=$(cat "$n/device/device" 2>/dev/null || true)
236 ven=${ven//$'\r'/}; did=${did//$'\r'/} 237 ven=${ven//$'\r'/}; did=${did//$'\r'/}
237 [ "${ven,,}:${did,,}" = "0x${dev_lc%%:*}:0x${dev_lc#*:}" ] \ 238 [ "$(lc "$ven"):$(lc "$did")" = "0x${dev_lc%%:*}:0x${dev_lc#*:}" ] \
238 && export KWIN_DRM_DEVICES=/dev/dri/${n##*/} 239 && export KWIN_DRM_DEVICES=/dev/dri/${n##*/}
239 done 240 done
240else 241else