功能:接入Linux原生光标并完善设备接入工具

This commit is contained in:
songyiming committed 2026-11-05 19:18:54 +08:00
1 parent a14f028402
commit a47968496e
92 files changed
+3090 -22

No files matched your search

+7 -3
View File
@@ -28,16 +28,20 @@ PATCH_DIR="${VDI_MOONLIGHT_PATCH_DIR:-$(cd "$(dirname "$0")/../terminal/moonligh
apply_vdi_patch() {
local source="$1" patch="$2"
test -r "$patch" || { echo "Missing VDI patch: $patch" >&2; exit 1; }
if git -C "$source" apply --reverse --check "$patch" 2>/dev/null; then
# A Windows checkout can give patch files CRLF. Normalize patch transport
# only; source drift still has to pass the ordinary exact-context check.
if sed 's/\r$//' "$patch" | git -C "$source" apply --reverse --check - 2>/dev/null; then
return
fi
git -C "$source" apply --check "$patch"
git -C "$source" apply "$patch"
sed 's/\r$//' "$patch" | git -C "$source" apply --check -
sed 's/\r$//' "$patch" | git -C "$source" apply -
}
apply_vdi_patch "$TASK_ROOT/src/moonlight" "$PATCH_DIR/0001-vdi-input-and-latest-frame.patch"
apply_vdi_patch "$TASK_ROOT/src/moonlight/moonlight-common-c/moonlight-common-c" \
"$PATCH_DIR/0002-vdi-absolute-click-barrier.patch"
apply_vdi_patch "$TASK_ROOT/src/moonlight" "$PATCH_DIR/0003-vdi-input-priority.patch"
apply_vdi_patch "$TASK_ROOT/src/moonlight" "$PATCH_DIR/0004-vdi-power-key-policy.patch"
apply_vdi_patch "$TASK_ROOT/src/moonlight" "$PATCH_DIR/0005-vdi-native-linux-cursor.patch"
# Moonlight 6.2.0 uses std::optional in drm.h but relies on a transitive
# include from Qt 6. Our Qt 5 build needs the standard header explicitly.