[Workaround] RPI2 keystrokes leaking into X11 terminal |
josephpaul0
|
Applies to : Raspberry Pi 2 and SDL 2.0.4
OS : Raspbian Jessie and Ubuntu MATE for RPI Problem : when started from a terminal under X-Window, SDL2 programs leak keyboard input into the X11 terminal. Consequence : Undesired shell commands may be executed and have a potentially dangerous outcome. Workarounds: - start SDL2 programs from a pure tty (not under X11). - or capture stdin into your SDL2 application (under X11). [HOWTO]Â Capturing stdin into your SDL2 program: You can read this code from Rock Dodger CE as an example. Then use it into you main() function like this:
|
|||||||||||||
|