mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-04-03 06:09:20 +00:00
KMSDRM/EVDEV: add VT switching support for FreeBSD (#14346)
Signed-off-by: Quentin Thébault <quentin.thebault@defenso.fr>
This commit is contained in:
@@ -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];
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user