SDL
SDL copied to clipboard
kmsdrm: VT switching doesn't work
It seems VT switching was implemented per https://github.com/libsdl-org/SDL/pull/8509 It doesn't work here though.
Steps to reproduce:
- Ctrl-Alt-f5 to console
- cd <sdl_build_dir>/test
- ./testdraw
- Press Ctrl-Alt-f3 or Alt-f3 or whatever
Result:
- nothing happens
Expected result:
- VT switch
What platform are you running on?
Ubuntu 25.04/x86_64
Ironically if you don't have access to the keyboard, console switching works. Something about how we initialize the keyboard disables console switching.
Also, using sudo runs the application under a psuedo-tty, so it doesn't have access to the console.
I already filled https://github.com/sudo-project/sudo/issues/447
and I think sudo will add
SUDO_TTY var in the future.
Then you can at least re-open
the console.
Maybe sdl can add some fn
for the user to pass the console
fd to it.
SUDO_TTY is now implemented. Do you think an app should open the tty and pass an fd to sdl somehow?