Added SDL_HINT_MUTE_CONSOLE_KEYBOARD

This commit is contained in:
Sam Lantinga 2024-08-03 12:23:56 -07:00
parent afde1cc9c2
commit 746b8eb14b
4 changed files with 21 additions and 4 deletions

View file

@ -473,8 +473,7 @@ void SDL_EVDEV_kbd_set_muted(SDL_EVDEV_keyboard_state *state, SDL_bool muted)
}
if (muted) {
/* Allow inhibiting keyboard mute with env. variable for debugging etc. */
if (SDL_getenv("SDL_INPUT_LINUX_KEEP_KBD") == NULL) {
if (SDL_GetHintBoolean(SDL_HINT_MUTE_CONSOLE_KEYBOARD, SDL_TRUE)) {
/* Mute the keyboard so keystrokes only generate evdev events
* and do not leak through to the console
*/