only detect CTRL+C for SIGINT, not C+CTRL

This commit is contained in:
Toad King 2012-06-19 15:26:09 -04:00
parent ca552db8d2
commit 91e7855bd6
1 changed files with 3 additions and 3 deletions

View File

@ -280,6 +280,9 @@ static void linuxraw_input_poll(void *data)
while (read(0, &c, 1) > 0)
{
if (c == KEY_C && (linuxraw->state[KEY_LEFTCTRL] || linuxraw->state[KEY_RIGHTCTRL]))
kill(getpid(), SIGINT);
bool pressed = !(c & 0x80);
c &= ~0x80;
@ -290,9 +293,6 @@ static void linuxraw_input_poll(void *data)
linuxraw->state[c] = pressed;
}
if (linuxraw->state[KEY_C] && (linuxraw->state[KEY_LEFTCTRL] || linuxraw->state[KEY_RIGHTCTRL]))
kill(getpid(), SIGINT);
input_sdl.poll(linuxraw->sdl);
}