Skip to content

Xbox Cloud Gaming app for PS5 Homebrew

C

chore(ps4): no /dev/uhid scan on PS4; autotest drops every old capture

Rafael Abud Ferreira58f2c9f1133a
diff --git a/src/input/pad_usb.cpp b/src/input/pad_usb.cpp
index 30d7a0b..3ca58c0 100644
--- a/src/input/pad_usb.cpp
+++ b/src/input/pad_usb.cpp
@@ -12,7 +12,9 @@
#include <mutex>
#include <vector>
-#if defined(__unix__) || defined(__linux__) || defined(__APPLE__) || defined(__posix)
+// XC_NO_UHID_PADS (PS4): pads come through the system there, and /dev/uhid* does not
+// exist (the scan only cost an open() per node every 2 s).
+#if (defined(__unix__) || defined(__linux__) || defined(__APPLE__) || defined(__posix)) && !defined(XC_NO_UHID_PADS)
#include <dirent.h>
#include <errno.h>
#include <fcntl.h>
diff --git a/tools/ps4/autotest.sh b/tools/ps4/autotest.sh
index eb16052..2b965f4 100755
--- a/tools/ps4/autotest.sh
+++ b/tools/ps4/autotest.sh
@@ -44,9 +44,9 @@ if [ -f "$root/build-ps4/pkg_stage/account.json" ]; then
fi
# Clean old dumps
-for f in ui.ppm library.ppm splash.ppm detail.ppm settings.ppm screen.ppm error.ppm frame.ppm frame2.ppm xcloud.log; do
- rm -f "$PSBOX_DATA/$f"
-done
+# Every capture, not a fixed list: names left out (launch.ppm, grid*.ppm...) were copied
+# back as if this run had made them.
+rm -f "$PSBOX_DATA"/*.ppm "$PSBOX_DATA/xcloud.log" "$PSBOX_DATA/xcloud.prev.log"
rm -f "$PSBOX_DATA/autoplay.txt"
# Write test directive