From e0c1c9e980705f6af39501c27c7be488f47d3510 Mon Sep 17 00:00:00 2001 From: "prompt.ac/@jeffrey" Date: Tue, 7 Apr 2026 10:24:08 -0700 Subject: [PATCH] fix: increase MAX_INPUT_DEVICES from 8 to 24 ThinkPad 11e has 18 evdev devices (touchscreen, touchpad, keyboard, buttons, etc). With limit of 8, readdir filled the array with event10-17 before reaching event4 (the keyboard). Keyboard and mouse input never worked. Co-Authored-By: Claude Opus 4.6 (1M context) --- fedac/native/src/ac-native.c | 4 ++-- fedac/native/src/input.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fedac/native/src/ac-native.c b/fedac/native/src/ac-native.c index cf09f9f30e..ecbc0d4e1c 100644 --- a/fedac/native/src/ac-native.c +++ b/fedac/native/src/ac-native.c @@ -1470,13 +1470,13 @@ static int draw_startup_fade(ACGraph *graph, ACFramebuffer *screen, } // Open evdev fds for key checking — retry until devices appear - int key_fds[8]; + int key_fds[24]; int key_fd_count = 0; for (int retry = 0; retry < 20 && key_fd_count == 0; retry++) { DIR *dir = opendir("/dev/input"); if (dir) { struct dirent *ent; - while ((ent = readdir(dir)) && key_fd_count < 8) { + while ((ent = readdir(dir)) && key_fd_count < 24) { if (strncmp(ent->d_name, "event", 5) != 0) continue; char path[64]; snprintf(path, sizeof(path), "/dev/input/%s", ent->d_name); diff --git a/fedac/native/src/input.h b/fedac/native/src/input.h index 6f9d19526f..e657cb8145 100644 --- a/fedac/native/src/input.h +++ b/fedac/native/src/input.h @@ -6,7 +6,7 @@ #include #endif -#define MAX_INPUT_DEVICES 8 +#define MAX_INPUT_DEVICES 24 #define MAX_HIDRAW_DEVICES 4 #define MAX_EVENTS_PER_FRAME 64 -- 2.51.2