From 42738b75025c06351b99fc3e9443a01c7c5af937 Mon Sep 17 00:00:00 2001 From: Vojtech Horky Date: Wed, 13 Nov 2013 10:34:44 +0100 Subject: [PATCH] Fix tetris sources in dist/src --- uspace/dist/src/c/demos/tetris/screen.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/uspace/dist/src/c/demos/tetris/screen.c b/uspace/dist/src/c/demos/tetris/screen.c index bd960f924..1384e54b1 100644 --- a/uspace/dist/src/c/demos/tetris/screen.c +++ b/uspace/dist/src/c/demos/tetris/screen.c @@ -343,9 +343,9 @@ void tsleep(void) suseconds_t timeout = fallrate; while (timeout > 0) { - kbd_event_t event; + cons_event_t event; - if (!console_get_kbd_event_timeout(console, &event, &timeout)) + if (!console_get_event_timeout(console, &event, &timeout)) break; } } @@ -375,15 +375,15 @@ int tgetchar(void) wchar_t c = 0; while (c == 0) { - kbd_event_t event; + cons_event_t event; - if (!console_get_kbd_event_timeout(console, &event, &timeleft)) { + if (!console_get_event_timeout(console, &event, &timeleft)) { timeleft = 0; return -1; } - if (event.type == KEY_PRESS) - c = event.c; + if (event.type == CEV_KEY && event.ev.key.type == KEY_PRESS) + c = event.ev.key.c; } return (int) c; @@ -397,13 +397,13 @@ int twait(void) wchar_t c = 0; while (c == 0) { - kbd_event_t event; + cons_event_t event; - if (!console_get_kbd_event(console, &event)) + if (!console_get_event(console, &event)) return -1; - if (event.type == KEY_PRESS) - c = event.c; + if (event.type == CEV_KEY && event.ev.key.type == KEY_PRESS) + c = event.ev.key.c; } return (int) c; -- 2.11.4.GIT