KMSDRM/EVDEV: add VT switching support for FreeBSD (#14346)

Signed-off-by: Quentin Thébault <quentin.thebault@defenso.fr>
This commit is contained in:
Quentin Thébault
2025-10-29 16:52:32 +00:00
committed by GitHub
parent b3612f6462
commit 3b80fcd1a0
3 changed files with 215 additions and 35 deletions

View File

@@ -329,6 +329,11 @@ void SDL_EVDEV_Poll(void)
for (item = _this->first; item; item = item->next) {
while ((len = read(item->fd, events, sizeof(events))) > 0) {
#ifdef SDL_INPUT_FBSDKBIO
if (SDL_GetAtomicInt(&vt_current) == VT_THEIRS) {
continue;
}
#endif
len /= sizeof(events[0]);
for (i = 0; i < len; ++i) {
struct input_event *event = &events[i];

View File

@@ -22,6 +22,14 @@
#ifndef SDL_evdev_kbd_h_
#define SDL_evdev_kbd_h_
#ifdef SDL_INPUT_FBSDKBIO
enum {
VT_OURS,
VT_THEIRS,
};
extern SDL_AtomicInt vt_current;
#endif
struct SDL_EVDEV_keyboard_state;
typedef struct SDL_EVDEV_keyboard_state SDL_EVDEV_keyboard_state;