Attempt to prevent segfault when pressing Enter in DRM/KMS mode

This commit is contained in:
twinaphex 2016-01-02 22:28:21 +01:00
parent 0bdbac3d87
commit ef7a786527
2 changed files with 4 additions and 2 deletions

View File

@ -68,8 +68,6 @@ bool linux_terminal_init(void)
if (tcsetattr(0, TCSAFLUSH, &newTerm) < 0)
return false;
if (ioctl(0, KDSKBMODE, K_MEDIUMRAW) < 0)
return false;
return true;
}
@ -101,6 +99,9 @@ bool linux_terminal_disable_input(void)
return false;
if (!linux_terminal_init())
return false;
if (ioctl(0, KDSKBMODE, K_MEDIUMRAW) < 0)
{
linux_terminal_flush();
return false;

View File

@ -697,6 +697,7 @@ static void *udev_input_init(void)
input_keymaps_init_keyboard_lut(rarch_key_map_linux);
linux_terminal_disable_input();
return udev;
error: