Add scripted button input for headless runs

This commit is contained in:
Baptiste MOINE committed 2026-08-04 01:17:52 +02:00
1 parent da5370b2ec
commit 96735bd2c4
3 files changed
+249

No files matched your search

+8
View File
@@ -27,6 +27,7 @@
#include "display/sdl_display.h"
#include "display/config_window.h"
#include "display/console_window.h"
#include "input_script.h"
// ==================== Payload Loading ====================
@@ -352,6 +353,10 @@ int main(int argc, char *argv[]) {
for (int i = 2; i < argc; i++) {
if (strcmp(argv[i], "--auto-pin-recovery") == 0) auto_pin_recovery = true;
else if (strcmp(argv[i], "--auto-te-script") == 0) auto_te_script = true;
// Generic scripted button input, for menu-driven payloads that can't
// be driven any other way from a headless / CI run.
else if (strcmp(argv[i], "--input-script") == 0 && i + 1 < argc)
input_script_load(argv[++i]);
}
if (sd_path) {
@@ -563,6 +568,9 @@ int main(int argc, char *argv[]) {
}
}
// Scripted button input (--input-script).
input_script_tick(state);
// Touch injection for the Nyx GUI popup (eMMC Issues Warning).
// Nyx initializes after the IPL stage; we inject a tap once enough
// emulated time has passed for Nyx to load and render its dialog.